[weewx-user] Re: Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read

2018-04-08 Thread Kimberly Olsen
Hi Glenn


Yep did all of that. No sign of a swap file. I edited weewx.conf and all is 
fine

K

On Saturday, 7 April 2018 12:48:18 UTC+10, Kimberly Olsen wrote:
>
> I've been attempting to get ftp working this morning and suddenly when 
> attempting to edit weewx.conf, I get the message below
>
> This is when I am ssh-ing in from my Mac.
> When I attempt to edit the file directly on the pi, I cannot save it
>
> Any ideas ?
>
> Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read 
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read

2018-04-08 Thread Andrew Milner
if you are working on a local network there should be no noticeable lag at 
all when editing a file - perhaps you should investigate the cause of the 
lag.

do ensure all your rpi sw is up to date though

i use putty to ssh into all my pis and pizeros - and have never had an 
issue with lag even when weewx is running together with web server and 
MySQL or a gui is running to display on a touchscreen - never any issues at 
all, although on two of the rpi's I do use a hard disk rather than the sd.



On Sunday, 8 April 2018 08:45:59 UTC+3, Glenn McKechnie wrote:

> Apparently an older version of nano would return that error at 
> seemingly random times, possibly due to file corruption. 
> If you were suffering extreme lag in the connection then perhaps it is 
> related to that. 
> Check your version of nano, or update it if you feel it's an older one. 
> I really can't help much more with nano as I don't use it. 
>
> vi (vim) 
> In the absence of a suitable user config file, the default action is 
> to place it in the same directory as the file you are editiing, so in 
> this case it would be in /etc/weewx 
> If you ignore the lock file warning and decide to edit the file 
> anyway, you'll create another swp file - ending as .swo . Rinse repeat 
> for the next letter. 
> if vi is giving no clues about the swap files location then try using 
> find. 
>
> sudo find /etc/weewx -name *.sw[nop] 
> If that fails to return anything, broaden the search to... 
> sudo find / -name *.sw[nop] 
>
>
> Cheers 
>  Glenn 
>
> rorpi - read only raspberry pi & various weewx addons 
> https://github.com/glennmckechnie 
>
>
> On 8 April 2018 at 14:16, Kimberly Olsen  > wrote: 
> > Glenn, 
> > 
> > I can see no swap file despite vi insisting there is. No amount of ls 
> -la 
> > will find one 
> > 
> > K 
> > 
> > On Saturday, 7 April 2018 12:48:18 UTC+10, Kimberly Olsen wrote: 
> >> 
> >> I've been attempting to get ftp working this morning and suddenly when 
> >> attempting to edit weewx.conf, I get the message below 
> >> 
> >> This is when I am ssh-ing in from my Mac. 
> >> When I attempt to edit the file directly on the pi, I cannot save it 
> >> 
> >> Any ideas ? 
> >> 
> >> Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data 
> read 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "weewx-user" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to weewx-user+...@googlegroups.com . 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read

2018-04-07 Thread Glenn McKechnie
Apparently an older version of nano would return that error at
seemingly random times, possibly due to file corruption.
If you were suffering extreme lag in the connection then perhaps it is
related to that.
Check your version of nano, or update it if you feel it's an older one.
I really can't help much more with nano as I don't use it.

vi (vim)
In the absence of a suitable user config file, the default action is
to place it in the same directory as the file you are editiing, so in
this case it would be in /etc/weewx
If you ignore the lock file warning and decide to edit the file
anyway, you'll create another swp file - ending as .swo . Rinse repeat
for the next letter.
if vi is giving no clues about the swap files location then try using find.

sudo find /etc/weewx -name *.sw[nop]
If that fails to return anything, broaden the search to...
sudo find / -name *.sw[nop]


Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie


On 8 April 2018 at 14:16, Kimberly Olsen  wrote:
> Glenn,
>
> I can see no swap file despite vi insisting there is. No amount of ls -la
> will find one
>
> K
>
> On Saturday, 7 April 2018 12:48:18 UTC+10, Kimberly Olsen wrote:
>>
>> I've been attempting to get ftp working this morning and suddenly when
>> attempting to edit weewx.conf, I get the message below
>>
>> This is when I am ssh-ing in from my Mac.
>> When I attempt to edit the file directly on the pi, I cannot save it
>>
>> Any ideas ?
>>
>> Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read

2018-04-07 Thread Kimberly Olsen
Glenn,

I can see no swap file despite vi insisting there is. No amount of ls -la 
will find one

K

On Saturday, 7 April 2018 12:48:18 UTC+10, Kimberly Olsen wrote:
>
> I've been attempting to get ftp working this morning and suddenly when 
> attempting to edit weewx.conf, I get the message below
>
> This is when I am ssh-ing in from my Mac.
> When I attempt to edit the file directly on the pi, I cannot save it
>
> Any ideas ?
>
> Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read 
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read

2018-04-07 Thread Kimberly Olsen
I absolutely did end the nano session (i prefer nano) properly every time- 
so there must be another explanation.
Yesterday I was editing from SSH and was experiencing extreme lag. I am 
betting the two things are related

K

On Saturday, 7 April 2018 12:48:18 UTC+10, Kimberly Olsen wrote:
>
> I've been attempting to get ftp working this morning and suddenly when 
> attempting to edit weewx.conf, I get the message below
>
> This is when I am ssh-ing in from my Mac.
> When I attempt to edit the file directly on the pi, I cannot save it
>
> Any ideas ?
>
> Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read 
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read

2018-04-07 Thread Pete Geenhuizen
When you edit a file with  vi, which is actually a link to vim, it 
creates a backup file in your case .weewx.conf.swp. because it has a dot 
in front of the name the best way to see it is by using ls -la


When you save the file and exit vi the .filename.swpis removed, if 
however you kill the vi session or exit it any other abnormal way the 
.filename.swp file won't be removed.


You have 2 options simply remove the file or if you have some changes in 
the file that you want to recover then the best option is to recover the 
file which will have all the changes that you made in your last edit.  
To recover the last edits use vi -r save the file exit vi and then 
remove the .filename.swp file.


Like I said, to avoid this from happening always properly end the vi 
session.


Other than that it sounds like you are dealing with permission/ownership 
error, in that case check both the original file and the .filename.swp 
ownership.


I hope that this helps

Pete

On 04/07/18 15:44, Kimberly Olsen wrote:
and when I look for weewx.conf.swp, it doesn't exist...no nothing 
strange here ;-)




On Saturday, 7 April 2018 12:48:18 UTC+10, Kimberly Olsen wrote:

I've been attempting to get ftp working this morning and suddenly
when attempting to edit weewx.conf, I get the message below

This is when I am ssh-ing in from my Mac.
When I attempt to edit the file directly on the pi, I cannot save it

Any ideas ?

Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough
data read

--
You received this message because you are subscribed to the Google 
Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to weewx-user+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.

--
This message has been scanned for viruses and
dangerous content by *MailScanner* , and is
believed to be clean. 


--
Unencumbered by the thought process.
 -- Click and Clack the Tappet brothers


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

--
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read

2018-04-07 Thread Kimberly Olsen
and when I look for weewx.conf.swp, it doesn't exist...no nothing strange 
here ;-)



On Saturday, 7 April 2018 12:48:18 UTC+10, Kimberly Olsen wrote:
>
> I've been attempting to get ftp working this morning and suddenly when 
> attempting to edit weewx.conf, I get the message below
>
> This is when I am ssh-ing in from my Mac.
> When I attempt to edit the file directly on the pi, I cannot save it
>
> Any ideas ?
>
> Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read 
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read

2018-04-07 Thread Kimberly Olsen
If I attempt to edit weewx.conf in vi rather than nano, I get informed that 
the file is open and that the swap file is newer etc etc

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read

2018-04-07 Thread Kimberly Olsen
I am using the command sudo nano /etc/weewx/weewx.conf which resulted in 
the error
I am not unfamiliar with Linux basics having used some Unix in the past

Unfortunately I started with a fresh install, got new skins installed and 
despite being able to edit weewx.conf all day, again now it fails

K

On Saturday, 7 April 2018 12:48:18 UTC+10, Kimberly Olsen wrote:
>
> I've been attempting to get ftp working this morning and suddenly when 
> attempting to edit weewx.conf, I get the message below
>
> This is when I am ssh-ing in from my Mac.
> When I attempt to edit the file directly on the pi, I cannot save it
>
> Any ideas ?
>
> Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read 
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read

2018-04-07 Thread Kimberly Olsen
OK then why does it work most of the time and fail only occasioanally?

On Sunday, 8 April 2018 03:52:03 UTC+10, vince wrote:
>
> On Friday, April 6, 2018 at 7:48:18 PM UTC-7, Kimberly Olsen wrote:
>>
>> I've been attempting to get ftp working this morning and suddenly when 
>> attempting to edit weewx.conf, I get the message below
>>
>> This is when I am ssh-ing in from my Mac.
>> When I attempt to edit the file directly on the pi, I cannot save it
>>
>> Any ideas ?
>>
>> Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read 
>>
>
>
> You're running into the classic problem almost all new pi users run into. 
>  The account you're using is almost certainly 'pi' which is a 
> non-privlieged account.  You are trying to edit a file in a location that 
> only root has privileges for.   Run "sudo vi /etc/weewx/weewx.conf" so that 
> your vi session is running as root.
>
> Same for your other post about trying to save a skin.  You're trying to 
> save the skin to a root-owned directory, using a non-privileged account.   
> Again, preface your commands there with 'sudo'.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read

2018-04-07 Thread vince
On Friday, April 6, 2018 at 7:48:18 PM UTC-7, Kimberly Olsen wrote:
>
> I've been attempting to get ftp working this morning and suddenly when 
> attempting to edit weewx.conf, I get the message below
>
> This is when I am ssh-ing in from my Mac.
> When I attempt to edit the file directly on the pi, I cannot save it
>
> Any ideas ?
>
> Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read 
>


You're running into the classic problem almost all new pi users run into. 
 The account you're using is almost certainly 'pi' which is a 
non-privlieged account.  You are trying to edit a file in a location that 
only root has privileges for.   Run "sudo vi /etc/weewx/weewx.conf" so that 
your vi session is running as root.

Same for your other post about trying to save a skin.  You're trying to 
save the skin to a root-owned directory, using a non-privileged account.   
Again, preface your commands there with 'sudo'.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read

2018-04-06 Thread Glenn McKechnie
Close the editor and delete that swap file --  /etc/weewx/.weewx.conf.swp
Then try opening weewx.conf again.
ie; see if it's a problem with the swap file

Which editor? nano? and vi (vim)?

It won't matter if weewx is running or not. weewx.conf can be edited at any
time. Any changes made won't take affect until you restart weewx .





Cheers
 Glenn

rorpi - read only raspberry pi & various weewx addons
https://github.com/glennmckechnie

On 7 April 2018 at 12:49, Kimberly Olsen 
wrote:

> I should have added I have stopped WeeWX before editing but that makes no
> difference
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Error reading lock file /etc/weewx/.weewx.conf.swp: Not enough data read

2018-04-06 Thread Kimberly Olsen
I should have added I have stopped WeeWX before editing but that makes no 
difference

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.