error

164 views
Skip to first unread message

areax99

unread,
Nov 28, 2024, 12:05:01 PM11/28/24
to weewx-user
nov 28 17:55:15 raspberrypi4 weewxd[14480]: INFO weewx.manager: Added record 2024-11-28 17:55:00 CET (1732812900) to database 'weewx.sdb'
nov 28 17:55:16 raspberrypi4 weewxd[14480]: INFO weewx.manager: Added record 2024-11-28 17:55:00 CET (1732812900) to daily summary in 'weewx.sdb'
nov 28 17:55:16 raspberrypi4 weewxd[14480]: INFO weewx.restx: MQTT: Published record 2024-11-28 17:55:00 CET (1732812900)
nov 28 17:55:16 raspberrypi4 weewxd[14480]: DEBUG weewx.reportengine: Running reports for latest time in the database.
nov 28 17:55:16 raspberrypi4 weewxd[14480]: DEBUG weewx.reportengine: Report 'SeasonsReport' not enabled. Skipping.
nov 28 17:55:16 raspberrypi4 weewxd[14480]: DEBUG weewx.reportengine: Report 'SmartphoneReport' not enabled. Skipping.
nov 28 17:55:16 raspberrypi4 weewxd[14480]: DEBUG weewx.reportengine: Report 'MobileReport' not enabled. Skipping.
nov 28 17:55:16 raspberrypi4 weewxd[14480]: DEBUG weewx.reportengine: Report 'StandardReport' not enabled. Skipping.
nov 28 17:55:16 raspberrypi4 weewxd[14480]: DEBUG weewx.reportengine: Running report 'Belchertown'
nov 28 17:55:16 raspberrypi4 weewxd[14480]: DEBUG weewx.reportengine: Found configuration file /etc/weewx/skins/Belchertown/skin.conf for report 'Belchertown'
nov 28 17:55:16 raspberrypi4 weewxd[14480]: DEBUG weewx.reportengine: Unable to set locale 'it': unsupported locale setting. Using default.
nov 28 17:55:16 raspberrypi4 weewxd[14480]: DEBUG weewx.reportengine: Running generators for report 'Belchertown' in directory '/etc/weewx/skins/Belchertown' with locale 'it_IT@euro'
nov 28 17:55:16 raspberrypi4 weewxd[14480]: DEBUG weewx.cheetahgenerator: Using search list ['user.belchertown.getData', 'user.tablegenerator.TableGenerator', 'weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.DisplayOptions', 'weewx.cheetahgenerator.Extras', 'weewx.cheetahgenerator.Gettext', 'weewx.cheetahgenerator.JSONHelpers', 'weewx.cheetahgenerator.PlotInfo', 'weewx.cheetahgenerator.SkinInfo', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo']
nov 28 17:55:16 raspberrypi4 weewxd[14480]: INFO user.belchertown: version 1.3.1
nov 28 17:55:16 raspberrypi4 weewxd[14480]: DEBUG weewx.manager: Daily summary version is 4.0
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine: Caught unrecoverable exception in generator 'weewx.cheetahgenerator.CheetahGenerator'
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****  'utf-8' codec can't decode byte 0xe0 in position 22: invalid continuation byte
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****  Traceback (most recent call last):
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 248, in run
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****      obj.start()
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/reportengine.py", line 465, in start
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****      self.run()
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 166, in run
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****      ngen = self.generate(gen_dict[section_name], section_name, self.gen_ts)
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 226, in generate
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****      ngen += self.generate(section[subsection], subsection, gen_ts)
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 226, in generate
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****      ngen += self.generate(section[subsection], subsection, gen_ts)
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 309, in generate
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****      searchList = self._getSearchList(encoding, timespan,
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****    File "/usr/share/weewx/weewx/cheetahgenerator.py", line 401, in _getSearchList
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****      search_list += obj.get_extension_list(timespan, db_lookup)
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****    File "/etc/weewx/bin/user/belchertown.py", line 409, in get_extension_list
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****      chart_dict = configobj.ConfigObj(chart_config_path, file_error=True)
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****    File "/usr/lib/python3/dist-packages/configobj/__init__.py", line 1229, in __init__
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****      self._load(infile, configspec)
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****    File "/usr/lib/python3/dist-packages/configobj/__init__.py", line 1287, in _load
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****      content = self._handle_bom(content)
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****                ^^^^^^^^^^^^^^^^^^^^^^^^^
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****    File "/usr/lib/python3/dist-packages/configobj/__init__.py", line 1485, in _handle_bom
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****      return self._decode(infile, 'utf-8')
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****    File "/usr/lib/python3/dist-packages/configobj/__init__.py", line 1517, in _decode
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****      infile[i] = line.decode(encoding)
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****                  ^^^^^^^^^^^^^^^^^^^^^
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****  UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe0 in position 22: invalid continuation byte
nov 28 17:55:16 raspberrypi4 weewxd[14480]: ERROR weewx.reportengine:         ****  Generator terminated
nov 28 17:55:16 raspberrypi4 weewxd[14480]: Traceback (most recent call last):
nov 28 17:55:16 raspberrypi4 weewxd[14480]:   File "/usr/share/weewx/weewx/reportengine.py", line 248, in run
nov 28 17:55:16 raspberrypi4 weewxd[14480]:     obj.start()
nov 28 17:55:16 raspberrypi4 weewxd[14480]:   File "/usr/share/weewx/weewx/reportengine.py", line 465, in start
nov 28 17:55:16 raspberrypi4 weewxd[14480]:     self.run()
nov 28 17:55:16 raspberrypi4 weewxd[14480]:   File "/usr/share/weewx/weewx/cheetahgenerator.py", line 166, in run
nov 28 17:55:16 raspberrypi4 weewxd[14480]:     ngen = self.generate(gen_dict[section_name], section_name, self.gen_ts)
nov 28 17:55:16 raspberrypi4 weewxd[14480]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nov 28 17:55:16 raspberrypi4 weewxd[14480]:   File "/usr/share/weewx/weewx/cheetahgenerator.py", line 226, in generate
nov 28 17:55:16 raspberrypi4 weewxd[14480]:     ngen += self.generate(section[subsection], subsection, gen_ts)
nov 28 17:55:16 raspberrypi4 weewxd[14480]:             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nov 28 17:55:16 raspberrypi4 weewxd[14480]:   File "/usr/share/weewx/weewx/cheetahgenerator.py", line 226, in generate
nov 28 17:55:16 raspberrypi4 weewxd[14480]:     ngen += self.generate(section[subsection], subsection, gen_ts)
nov 28 17:55:16 raspberrypi4 weewxd[14480]:             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nov 28 17:55:16 raspberrypi4 weewxd[14480]:   File "/usr/share/weewx/weewx/cheetahgenerator.py", line 309, in generate
nov 28 17:55:16 raspberrypi4 weewxd[14480]:     searchList = self._getSearchList(encoding, timespan,
nov 28 17:55:16 raspberrypi4 weewxd[14480]:                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nov 28 17:55:16 raspberrypi4 weewxd[14480]:   File "/usr/share/weewx/weewx/cheetahgenerator.py", line 401, in _getSearchList
nov 28 17:55:16 raspberrypi4 weewxd[14480]:     search_list += obj.get_extension_list(timespan, db_lookup)
nov 28 17:55:16 raspberrypi4 weewxd[14480]:                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nov 28 17:55:16 raspberrypi4 weewxd[14480]:   File "/etc/weewx/bin/user/belchertown.py", line 409, in get_extension_list
nov 28 17:55:16 raspberrypi4 weewxd[14480]:     chart_dict = configobj.ConfigObj(chart_config_path, file_error=True)
nov 28 17:55:16 raspberrypi4 weewxd[14480]:                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nov 28 17:55:16 raspberrypi4 weewxd[14480]:   File "/usr/lib/python3/dist-packages/configobj/__init__.py", line 1229, in __init__
nov 28 17:55:16 raspberrypi4 weewxd[14480]:     self._load(infile, configspec)
nov 28 17:55:16 raspberrypi4 weewxd[14480]:   File "/usr/lib/python3/dist-packages/configobj/__init__.py", line 1287, in _load
nov 28 17:55:16 raspberrypi4 weewxd[14480]:     content = self._handle_bom(content)
nov 28 17:55:16 raspberrypi4 weewxd[14480]:               ^^^^^^^^^^^^^^^^^^^^^^^^^
nov 28 17:55:16 raspberrypi4 weewxd[14480]:   File "/usr/lib/python3/dist-packages/configobj/__init__.py", line 1485, in _handle_bom
nov 28 17:55:16 raspberrypi4 weewxd[14480]:     return self._decode(infile, 'utf-8')
nov 28 17:55:16 raspberrypi4 weewxd[14480]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nov 28 17:55:16 raspberrypi4 weewxd[14480]:   File "/usr/lib/python3/dist-packages/configobj/__init__.py", line 1517, in _decode
nov 28 17:55:16 raspberrypi4 weewxd[14480]:     infile[i] = line.decode(encoding)
nov 28 17:55:16 raspberrypi4 weewxd[14480]:                 ^^^^^^^^^^^^^^^^^^^^^
nov 28 17:55:16 raspberrypi4 weewxd[14480]: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe0 in position 22: invalid continuation byte

Help! I'm going crazy! I installed weewx with simulator and Belchertown skin. It's not the first time I install it, I installed several weather stations with weewx. Now I'm getting these errors, but I can't figure out where they come from, probably from weewx.conf or skin.conf. I checked the two files but I couldn't figure out why...

Tom Keffer

unread,
Nov 28, 2024, 2:37:23 PM11/28/24
to weewx...@googlegroups.com
Can't be positive, but the odds are that it's in the skin configuration file skin.conf for the Belchertown skin. It's happening when setting up the search list, which is part of the preprocessing, rather than the processing of the templates themselves. If it was in a template, the error message should have mentioned it.

The file is encoded in UTF-8. As ConfigObj was processing it, it found a byte with value zero in byte 22, which is not what it was expecting.

How did it get there? The most common reason is that it was introduced by an editor that doesn't know how to handle UTF-8.

That leads to:
1. What editor are you using?
2. What's in byte 22 of skin.conf? 

--
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 weewx-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/495f1a16-26d2-4853-bf65-cf11c875bddcn%40googlegroups.com.

areax99

unread,
Nov 29, 2024, 2:55:58 AM11/29/24
to weewx-user
the editor i am using is Studio Visual Code, while how do i identify byte 22 in skin.conf file? is it the position or the line in editor?

michael.k...@gmx.at

unread,
Nov 29, 2024, 10:43:42 AM11/29/24
to weewx-user
It's the 22nd byte in the sequence of the file, which is not necessarily the 22nd character, because utf-8 encoded characters may be more than one byte. To be sure, you need a HEX-editor.

Karen K

unread,
Nov 29, 2024, 11:07:20 AM11/29/24
to weewx-user
I guess, 22 bytes you can count by hand. If there is nothing special at that position, delete some characters around and write them anew.

Reply all
Reply to author
Forward
0 new messages