I inserted this line into my driver:
weewx.units.obs_group_dict['signal1'] = 'group_angle'
when I run weewx I get this error in syslog:
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: Caught unrecoverable exception:
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** 'group_angle'
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** Traceback (most recent call last):
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** File "/usr/share/weewx/weewxd", line 154, in main
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** engine.run()
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** File "/usr/share/weewx/weewx/engine.py", line 210, in run
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** File "/usr/share/weewx/weewx/engine.py", line 245, in dispatchEvent
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** callback(event)
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** File "/usr/share/weewx/weewx/engine.py", line 363, in new_loop_packet
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** converted_packet = self.converter.convertDict(event.packet)
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** File "/usr/share/weewx/weewx/units.py", line 952, in convertDict
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** target_dict[obs_type] = self.convert(as_value_tuple(obs_dict, obs_type))[0]
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** File "/usr/share/weewx/weewx/units.py", line 917, in convert
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** new_unit_type = self.group_unit_dict.get(val_t[2], USUnits[val_t[2]])
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** File "/usr/lib/python3.7/collections/__init__.py", line 914, in __getitem__
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** return self.__missing__(key) # support subclasses that define __missing__
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** File "/usr/lib/python3.7/collections/__init__.py", line 906, in __missing__
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** raise KeyError(key)
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** KeyError: 'group_angle'
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: **** Exiting.
if I change the line to this:
weewx.units.obs_group_dict['signal1'] = 'group_rain'
and run weewx I do not get the error.
Is group_angle a recent addition and not in my dictionary?