I am using fileparse to capture incoming weather data from a file.  
Watching syslog I notice that after a while fileparse starts to throw 
errors where it seems to be mixed up as to what is a name and what is a 
value.  For instance:

This is what the input record stream looks like:
Time=1560979190
windDir=225
windSpeed=0.7
windGust=6.7
windGustDir=0
outHumidity=100.0
outTemp=70.0
rain=0.02
pressure=29.43
supplyVoltage=4.35
lightLevel=0.00
Time=1560979192
windDir=248
windSpeed=0.0
windGust=6.7
windGustDir=0
outHumidity=100.0
outTemp=70.0
rain=0.02
pressure=29.43
supplyVoltage=4.35
lightLevel=0.00

After weewx runs for a while errors like this start appearing:

Jun 19 16:55:30 WeatherPi weewx[32206]: fileparse: cannot read value for 
'': could not convert string to float: l
Jun 19 16:55:41 WeatherPi weewx[32206]: fileparse: cannot read value for 
'': could not convert string to float: l
Jun 19 16:55:53 WeatherPi weewx[32206]: fileparse: cannot read value for 
'': could not convert string to float: l
Jun 19 16:56:52 WeatherPi weewx[32206]: fileparse: cannot read value for 
'wind': could not convert string to float: windS

Eventually, weewx crashes with the following message:

Jun 19 16:56:52 WeatherPi weewx[32206]: engine: Main loop exiting. Shutting 
engine down.
Jun 19 16:56:52 WeatherPi weewx[32206]: engine: Shutting down StdReport 
thread
Jun 19 16:56:52 WeatherPi weewx[32206]: engine: StdReport thread has been 
terminated
Jun 19 16:56:52 WeatherPi weewx[32206]: engine: Caught unrecoverable 
exception in engine:
Jun 19 16:56:52 WeatherPi weewx[32206]:     ****  'NoneType' object is not 
iterable
Jun 19 16:56:52 WeatherPi weewx[32206]:     ****  Traceback (most recent 
call last):
Jun 19 16:56:52 WeatherPi weewx[32206]:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 890, in main
Jun 19 16:56:52 WeatherPi weewx[32206]:     ****      engine.run()
Jun 19 16:56:52 WeatherPi weewx[32206]:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 191, in run
Jun 19 16:56:52 WeatherPi weewx[32206]:     ****      
self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
Jun 19 16:56:52 WeatherPi weewx[32206]:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
Jun 19 16:56:52 WeatherPi weewx[32206]:     ****      callback(event)
Jun 19 16:56:52 WeatherPi weewx[32206]:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 546, in new_loop_packet
Jun 19 16:56:52 WeatherPi weewx[32206]:     ****      
self.accumulator.addRecord(event.packet, add_hilo=self.loop_hilo)
Jun 19 16:56:52 WeatherPi weewx[32206]:     ****    File 
"/usr/share/weewx/weewx/accum.py", line 256, in addRecord
Jun 19 16:56:52 WeatherPi weewx[32206]:     ****      func(self, record, 
obs_type, add_hilo, weight)
Jun 19 16:56:52 WeatherPi weewx[32206]:     ****    File 
"/usr/share/weewx/weewx/accum.py", line 314, in add_value
Jun 19 16:56:52 WeatherPi weewx[32206]:     ****      
self[obs_type].addHiLo(val, record['dateTime'])
Jun 19 16:56:52 WeatherPi weewx[32206]:     ****    File 
"/usr/share/weewx/weewx/accum.py", line 168, in addHiLo
Jun 19 16:56:52 WeatherPi weewx[32206]:     ****      speed, dirN = val
Jun 19 16:56:52 WeatherPi weewx[32206]:     ****  TypeError: 'NoneType' 
object is not iterable
Jun 19 16:56:52 WeatherPi weewx[32206]:     ****  Exiting.

In this case it is apparently seeing the value of the 'wind' as the name 
'windSpeed'.  Can anyone help me understand why this would happen?  I've 
looked through my data file and I cannot see an obvious errors in the 
record structure.  Thanks in advance@

-- 
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/ecff12de-aeb5-4404-a7bf-1041ea5cb14f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to