Re: [weewx-user] FilePile help please

2019-05-07 Thread Colin Larsen
Hi Thomas, Done :) and it's been stable overnight, thanks again for the advice. Colin On Wed, May 8, 2019 at 1:59 AM Thomas Keffer wrote: > You should terminate your lines with '\n', not '\r' when you write your > file. > > while True: > data, addr = sock.recvfrom(1024) # buffer size is 10

Re: [weewx-user] FilePile help please

2019-05-07 Thread Thomas Keffer
You should terminate your lines with '\n', not '\r' when you write your file. while True: data, addr = sock.recvfrom(1024) # buffer size is 1024 bytes print "Received message:", data with open(fname, 'w') as f: for ds in data.split(','): f.write(ds + "\n") -tk On

Re: [weewx-user] FilePile help please

2019-05-07 Thread Colin Larsen
Thanks Gary appreciate the thoughts, I'll try those out tomorrow Colin On Tue, 7 May 2019, 20:23 gjr80, wrote: > A few thoughts. If it works sometimes and not others there must be a > problem with either the consistency of the format of the data or the > algorithm being used to parse the data.

Re: [weewx-user] FilePile help please

2019-05-07 Thread gjr80
A few thoughts. If it works sometimes and not others there must be a problem with either the consistency of the format of the data or the algorithm being used to parse the data. Can't say I am a big fan of slicing in a situation like this, I think it can be a bit rigid at times. Maybe consider

Re: [weewx-user] FilePile help please

2019-05-06 Thread Colin Larsen
Well this is a little strange. This went fine for a while then stopped again with pretty much the same error. It appears to be missing the beginning of the first line in the file which is AQI25 = then gets the reading which is 4.55 invalid literal for float(): 4.55#015AQI100 = 9.09#015AQIIndex = 1

Re: [weewx-user] FilePile help please

2019-05-06 Thread Colin Larsen
Hi Thomas Thanks for the quick reply. It was just the format, it needs the spaces so each line in the text file is AQI25 = 1.60 AQI100 = 3.30 AQIIndex = 6 AQICO2 = 683 Once I did that and checked the database after an archive period the fields were populated Does my section with the units

Re: [weewx-user] FilePile help please

2019-05-06 Thread Thomas Keffer
Hi, Colin Does your text file use newlines ('\n') as line delineators? Perhaps it is using the MS-DOS standard of '\n\r'? Examine the file carefully and make sure it contains what you think it contains. -tk On Mon, May 6, 2019 at 8:05 PM Colin Larsen wrote: > Hi all > > I'm trying to get Filep

[weewx-user] FilePile help please

2019-05-06 Thread Colin Larsen
Hi all I'm trying to get Filepile working but have come across an error that I don't understand. Any help appreciated. The database has been extended with fields to match those below in the data file - am I just missing spaces in the layout? Should it be AQI25 = 1.60 etc etc Many thanks This is