On Sunday, November 19, 2017 at 10:01:51 AM UTC-5, kan6526 wrote:
>
> Nov 19 22:23:19 debian6-ANN weewx[9312]: **** File
> "/usr/share/weewx/user/interceptor.py", line 999, in parse
> Nov 19 22:23:19 debian6-ANN weewx[9312]: **** year_total =
> self.decode_float(data.pop('yearlyrainin'))
> Nov 19 22:23:19 debian6-ANN weewx[9312]: **** KeyError: 'yearlyrainin'
> Nov 19 22:23:19 debian6-ANN weewx[9312]: **** Exiting.
>
> weewx 3.7.1
> interceptor 0.37
>
looks like yet another firmware variant.
you can deal with it by adding None as the default pop value by changing
this:
if 'dailyrainin' in data:
rain_total = self.decode_float(data.pop('dailyrainin'))
year_total = self.decode_float(data.pop('yearlyrainin'))
if year_total is not None:
rain_total = year_total
logdbg("using rain_total %s from yearlyrainin" %
rain_total)
else:
logdbg("using rain_total %s from dailyrainin" %
rain_total)
elif 'dailyrain' in data:
rain_total = self.decode_float(data.pop('dailyrain'))
year_total = self.decode_float(data.pop('yearlyrain'))
if year_total is not None:
rain_total = year_total
logdbg("using rain_total %s from yearlyrain" %
rain_total)
else:
logdbg("using rain_total %s from dailyrain" %
rain_total)
to this:
if 'dailyrainin' in data:
rain_total = self.decode_float(data.pop('dailyrainin',
None))
year_total = self.decode_float(data.pop('yearlyrainin',
None))
if year_total is not None:
rain_total = year_total
logdbg("using rain_total %s from yearlyrainin" %
rain_total)
else:
logdbg("using rain_total %s from dailyrainin" %
rain_total)
elif 'dailyrain' in data:
rain_total = self.decode_float(data.pop('dailyrain',
None))
year_total = self.decode_float(data.pop('yearlyrain',
None))
if year_total is not None:
rain_total = year_total
logdbg("using rain_total %s from yearlyrain" %
rain_total)
else:
logdbg("using rain_total %s from dailyrain" %
rain_total)
changes applied in weewx-interceptor 0.38
m
--
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].
For more options, visit https://groups.google.com/d/optout.