Ron,
Since your data file field names are in fact WeeWX field names there is no
need for a field map, I only asked because if you had one and it had some
issues then it could be messing things up.
On looking again at the fileparse code I realise I mis-read it, though I am
still sure that the issue is an occasional malformed data file. The
fileparse driver is pretty basic, it splits each line at the '=', the
string on the left of the '=' is the field name and the string on the right
is the data. The data is converted to a float. If the data cannot be
converted to a float WeeWX logs the offending field name and the error
message. So in the case of this line:
Jun 19 16:55:30 WeatherPi weewx[32206]: fileparse: cannot read value for '':
could not convert string to float: l
it tells us that fileparse tried to process the field '' (ie an empty
string) but it could not convert the field data to a float with the error
message being 'could not convert string to float: l'. That particular error
message displays the offending data after the : and for some reason it has
been truncated. Since it is a l (lower case L) I suspect that somehow the
data file has been malformed and 'lightLevel' has somehow ended up on the
right hand side of an '=' and since the corresponding field name is an
empty string. Either that or the data file is badly mangled. I would say
that at some stage your data file has a line:
=lightLevel
Have you been monitoring the data file when the error occurs? You could
try adding some debug code to fileparse.py, edit fileparse.py and add the
highlighted line shown below:
def _get_as_float(d, s):
v = None
if s in d:
try:
v = float(d[s])
except ValueError as e:
loginf("d=%s" %(d, ))
logerr("cannot read value for '%s': %s" % (s, e))
return v
save the file then restart WeeWX. Next time WeeWX encounters that
particular error it will dump the entire dictionary of data that it read
from the file. Ideally we would like to see the data file but to do so
would take a bit more code, this is a simple one liner that will give us he
next best thing and may give us a clue as to what is going on with the data
file.
Gary
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/dd9b54ee-da24-453b-9d57-659e5d6c7db3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.