matthewwall / weewx-wxt5x0

weeWX driver for the WX5x0 weather stations
GNU General Public License v3.0
6 stars 4 forks source link

TypeError: '<' not supported between instances of 'NoneType' and 'float' #8

Closed OH2LAK closed 7 months ago

OH2LAK commented 2 years ago

Weewx hangs itself regularly with this error related to the WXT5x0 driver. It is always the rain calculation which leads to this error with some certain past weather conditions

Python3 version 3.8.10 running in this host.

python3[3546099]: weewx[3546099] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 208, in run
python3[3546099]: weewx[3546099] CRITICAL __main__:     ****      for packet in self.console.genLoopPackets():
python3[3546099]: weewx[3546099] CRITICAL __main__:     ****    File "/usr/share/weewx/user/wxt5x0-python3.py", line 501, in genLoopPackets
python3[3546099]: weewx[3546099] CRITICAL __main__:     ****      packet = self._data_to_packet(data)
python3[3546099]: weewx[3546099] CRITICAL __main__:     ****    File "/usr/share/weewx/user/wxt5x0-python3.py", line 532, in _data_to_packet
python3[3546099]: weewx[3546099] CRITICAL __main__:     ****      packet['rain'] = self._delta_rain(
python3[3546099]: weewx[3546099] CRITICAL __main__:     ****    File "/usr/share/weewx/user/wxt5x0-python3.py", line 542, in _delta_rain
python3[3546099]: weewx[3546099] CRITICAL __main__:     ****      if rain < last_rain:
python3[3546099]: weewx[3546099] CRITICAL __main__:     ****  TypeError: '<' not supported between instances of 'NoneType' and 'float'
python3[3546099]: weewx[3546099] CRITICAL __main__:     ****  Exiting.

Some times the rain measurement passes OK according to the log file;

python3[1513]: weewx[1513] INFO user.wxt5x0-python3: skipping rain measurement of 564.8452: no last rain
OH2LAK commented 9 months ago

This still happens, with Python 3.10.12

@matthewwall Do you have a clue why this happens?

Happy new year!

matthewwall commented 7 months ago

fixed at commit d64d397