Yes, it is a bug! Fixed in commit 762215f4 <https://github.com/weewx/weewx/commit/762215f413996d4f6541fdac4a90050d63f9ebfc> .
You can replace your copy of ws1.py with this copy <https://raw.githubusercontent.com/weewx/weewx/762215f413996d4f6541fdac4a90050d63f9ebfc/bin/weewx/drivers/ws1.py> if you want the fix. Let me know if it doesn't work for you. -tk On Tue, May 14, 2019 at 3:45 PM Brad Henderson <[email protected]> wrote: > Hi all, > > I've had my Weewx install crash a couple of times in the last week after > approximately 3 days of flawless running. The issue seems to be related to > some bad packets received by the WS1, which then seem to get used by the > rain calculation. I'm guessing these have not been checked that they are > valid floating point values, hence the crash. > > My system is running on a Raspberry Pi Model B (2012) with 512 MB of > onboard memory. Standard install of weewx 3.9.1. > > Log file excerpt below. Should I log this as a bug? > > May 15 04:11:12 raspberrypi weewx[24976]: ws1: Failed attempt 1 of 5 to > get readings: Unexpected buffer length 102 > May 15 04:11:23 raspberrypi weewx[24976]: ws1: Failed attempt 1 of 5 to > get readings: Unexpected buffer length 102 > May 15 04:11:33 raspberrypi weewx[24976]: ws1: Failed attempt 2 of 5 to > get readings: Unexpected buffer length 354 > May 15 04:11:44 raspberrypi weewx[24976]: ws1: Failed attempt 1 of 5 to > get readings: Unexpected buffer length 102 > May 15 04:11:55 raspberrypi weewx[24976]: ws1: Failed attempt 1 of 5 to > get readings: Unexpected buffer length 154 > May 15 04:12:05 raspberrypi weewx[24976]: ws1: Failed attempt 1 of 5 to > get readings: Unexpected buffer length 102 > May 15 04:12:16 raspberrypi weewx[24976]: ws1: Failed attempt 1 of 5 to > get readings: Unexpected buffer length 102 > May 15 04:12:26 raspberrypi weewx[24976]: ws1: Failed attempt 1 of 5 to > get readings: Unexpected buffer length 101 > May 15 04:12:36 raspberrypi weewx[24976]: ws1: Failed attempt 2 of 5 to > get readings: Unexpected buffer length 102 > May 15 04:12:46 raspberrypi weewx[24976]: ws1: Failed attempt 1 of 5 to > get readings: Unexpected buffer length 102 > May 15 04:12:58 raspberrypi weewx[24976]: ws1: Failed attempt 1 of 5 to > get readings: Unexpected buffer length 151 > May 15 04:13:08 raspberrypi weewx[24976]: ws1: Failed attempt 1 of 5 to > get readings: Unexpected buffer length 102 > May 15 04:13:18 raspberrypi weewx[24976]: ws1: Failed attempt 1 of 5 to > get readings: Unexpected buffer length 351 > May 15 04:13:28 raspberrypi weewx[24976]: ws1: Failed attempt 1 of 5 to > get readings: Unexpected buffer length 48 > May 15 04:13:39 raspberrypi weewx[24976]: ws1: Failed attempt 1 of 5 to > get readings: Unexpected buffer length 102 > May 15 04:13:49 raspberrypi weewx[24976]: ws1: Failed attempt 2 of 5 to > get readings: Unexpected buffer length 47 > May 15 04:13:59 raspberrypi weewx[24976]: ws1: Failed attempt 3 of 5 to > get readings: Unexpected buffer length 195 > May 15 04:14:09 raspberrypi weewx[24976]: ws1: Failed attempt 1 of 5 to > get readings: Unexpected buffer length 152 > May 15 04:14:19 raspberrypi weewx[24976]: ws1: Failed attempt 2 of 5 to > get readings: Unexpected buffer length 102 > May 15 04:14:29 raspberrypi weewx[24976]: ws1: Failed attempt 3 of 5 to > get readings: Unexpected buffer length 200 > May 15 04:14:39 raspberrypi weewx[24976]: engine: Main loop exiting. > Shutting engine down. > May 15 04:14:39 raspberrypi weewx[24976]: engine: Shutting down StdReport > thread > May 15 04:14:39 raspberrypi weewx[24976]: engine: Caught unrecoverable > exception in engine: > May 15 04:14:39 raspberrypi weewx[24976]: **** unsupported operand > type(s) for -: 'NoneType' and 'float' > May 15 04:14:39 raspberrypi weewx[24976]: **** Traceback (most recent > call last): > May 15 04:14:39 raspberrypi weewx[24976]: **** File > "/usr/share/weewx/weewx/engine.py", line 890, in main > May 15 04:14:39 raspberrypi weewx[24976]: **** engine.run() > May 15 04:14:39 raspberrypi weewx[24976]: **** File > "/usr/share/weewx/weewx/engine.py", line 188, in run > May 15 04:14:39 raspberrypi weewx[24976]: **** for packet in > self.console.genLoopPackets(): > May 15 04:14:39 raspberrypi weewx[24976]: **** File > "/usr/share/weewx/weewx/drivers/ws1.py", line 126, in genLoopPackets > May 15 04:14:39 raspberrypi weewx[24976]: **** > self._augment_packet(packet) > May 15 04:14:39 raspberrypi weewx[24976]: **** File > "/usr/share/weewx/weewx/drivers/ws1.py", line 132, in _augment_packet > May 15 04:14:39 raspberrypi weewx[24976]: **** packet['rain'] = > packet['rain_total'] - self.last_rain > May 15 04:14:39 raspberrypi weewx[24976]: **** TypeError: unsupported > operand type(s) for -: 'NoneType' and 'float' > May 15 04:14:39 raspberrypi weewx[24976]: **** Exiting. > > > -- > 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/82748289-8895-4683-8120-e4d329fb6c83%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/82748289-8895-4683-8120-e4d329fb6c83%40googlegroups.com?utm_medium=email&utm_source=footer> > . > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEA856%3DM_m1rwexgtWtU8MBpf1mraQAOCUML1_kgeHKMdA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
