locale.format() has been deprecated since Python 3.7, and was removed in Python 3.12. It has been replaced with local.format_string().
I believe that there was a pull request submitted to the Belchertown repository to fix this. I don't know if Pat has done a new release to reflect the fix. Alternatively, you could downgrade your version of Python. On Sat, Jun 22, 2024 at 7:11 AM MaKi68 <[email protected]> wrote: > Hello, > I installed weewx 5.02 with the Belchertown skin on Ubuntu 24.04. > I installed weewx in Debian and pip as a test. > Unfortunately, both versions produce an error message > > Debian: > 2024-06-22T14:52:16.564778+02:00 weewx-ubuntu weectl[11523]: INFO > user.belchertown: version 1.3.1 > 2024-06-22T14:52:16.574267+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: Caught unrecoverable exception in generator > 'weewx.cheetahgenerator.CheetahGenerator' > 2024-06-22T14:52:16.574381+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** module 'locale' has no attribute 'format' > 2024-06-22T14:52:16.579307+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** Traceback (most recent call last): > 2024-06-22T14:52:16.579411+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** File > "/usr/share/weewx/weewx/reportengine.py", line 220, in run > 2024-06-22T14:52:16.579478+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** obj.start() > 2024-06-22T14:52:16.579544+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** File > "/usr/share/weewx/weewx/reportengine.py", line 409, in start > 2024-06-22T14:52:16.579613+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** self.run() > 2024-06-22T14:52:16.579674+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** File > "/usr/share/weewx/weewx/cheetahgenerator.py", line 166, in run > 2024-06-22T14:52:16.579748+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** ngen = > self.generate(gen_dict[section_name], section_name, self.gen_ts) > 2024-06-22T14:52:16.579821+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > 2024-06-22T14:52:16.579893+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** File > "/usr/share/weewx/weewx/cheetahgenerator.py", line 226, in generate > 2024-06-22T14:52:16.579981+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** ngen += > self.generate(section[subsection], subsection, gen_ts) > 2024-06-22T14:52:16.580055+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > 2024-06-22T14:52:16.580124+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** File > "/usr/share/weewx/weewx/cheetahgenerator.py", line 226, in generate > 2024-06-22T14:52:16.580191+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** ngen += > self.generate(section[subsection], subsection, gen_ts) > 2024-06-22T14:52:16.580257+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > 2024-06-22T14:52:16.580323+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** File > "/usr/share/weewx/weewx/cheetahgenerator.py", line 309, in generate > 2024-06-22T14:52:16.580394+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** searchList = > self._getSearchList(encoding, timespan, > 2024-06-22T14:52:16.580471+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > 2024-06-22T14:52:16.580541+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** File > "/usr/share/weewx/weewx/cheetahgenerator.py", line 401, in _getSearchList > 2024-06-22T14:52:16.580613+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** search_list += > obj.get_extension_list(timespan, db_lookup) > 2024-06-22T14:52:16.580682+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > 2024-06-22T14:52:16.580753+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** File > "/etc/weewx/bin/user/belchertown.py", line 619, in get_extension_list > 2024-06-22T14:52:16.580823+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** locale.format("%.1f", 0), > 2024-06-22T14:52:16.580902+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** ^^^^^^^^^^^^^ > 2024-06-22T14:52:16.580983+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** AttributeError: module 'locale' has no > attribute 'format'. Did you mean: '_format'? > 2024-06-22T14:52:16.581049+02:00 weewx-ubuntu weectl[11523]: ERROR > weewx.reportengine: **** Generator terminated > > pip: > 2024-06-22T15:55:56.747209+02:00 weewx-ubuntu weectl[17348]: INFO > user.belchertown: version 1.3.1 > 2024-06-22T15:55:56.819946+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: Caught unrecoverable exception in generator > 'weewx.cheetahgenerator.CheetahGenerator' > 2024-06-22T15:55:56.820074+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** module 'locale' has no attribute 'format' > 2024-06-22T15:55:56.823093+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** Traceback (most recent call last): > 2024-06-22T15:55:56.823205+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** File > "/home/maki68/weewx-venv/lib/python3.12/site-packages/weewx/reportengine.py", > line 220, in run > 2024-06-22T15:55:56.823271+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** obj.start() > 2024-06-22T15:55:56.823335+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** File > "/home/maki68/weewx-venv/lib/python3.12/site-packages/weewx/reportengine.py", > line 409, in start > 2024-06-22T15:55:56.823397+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** self.run() > 2024-06-22T15:55:56.823463+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** File > "/home/maki68/weewx-venv/lib/python3.12/site-packages/weewx/cheetahgenerator.py", > line 166, in run > 2024-06-22T15:55:56.823526+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** ngen = > self.generate(gen_dict[section_name], section_name, self.gen_ts) > 2024-06-22T15:55:56.823591+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > 2024-06-22T15:55:56.823669+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** File > "/home/maki68/weewx-venv/lib/python3.12/site-packages/weewx/cheetahgenerator.py", > line 226, in generate > 2024-06-22T15:55:56.823743+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** ngen += > self.generate(section[subsection], subsection, gen_ts) > 2024-06-22T15:55:56.823806+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > 2024-06-22T15:55:56.823875+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** File > "/home/maki68/weewx-venv/lib/python3.12/site-packages/weewx/cheetahgenerator.py", > line 226, in generate > 2024-06-22T15:55:56.823954+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** ngen += > self.generate(section[subsection], subsection, gen_ts) > 2024-06-22T15:55:56.824024+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > 2024-06-22T15:55:56.824090+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** File > "/home/maki68/weewx-venv/lib/python3.12/site-packages/weewx/cheetahgenerator.py", > line 309, in generate > 2024-06-22T15:55:56.824169+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** searchList = > self._getSearchList(encoding, timespan, > 2024-06-22T15:55:56.824243+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > 2024-06-22T15:55:56.824319+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** File > "/home/maki68/weewx-venv/lib/python3.12/site-packages/weewx/cheetahgenerator.py", > line 401, in _getSearchList > 2024-06-22T15:55:56.824392+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** search_list += > obj.get_extension_list(timespan, db_lookup) > 2024-06-22T15:55:56.824463+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > 2024-06-22T15:55:56.824536+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** File > "/home/maki68/weewx-data/bin/user/belchertown.py", line 612, in > get_extension_list > 2024-06-22T15:55:56.824614+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** locale.format("%g", > float(year_outTemp_max_range_total)), > 2024-06-22T15:55:56.824688+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** ^^^^^^^^^^^^^ > 2024-06-22T15:55:56.824757+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** AttributeError: module 'locale' has no > attribute 'format'. Did you mean: '_format'? > 2024-06-22T15:55:56.824831+02:00 weewx-ubuntu weectl[17348]: ERROR > weewx.reportengine: **** Generator terminated > > Is this a weewx problem or a problem in the skin? > > Thanks! > > -- > 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/8b2a8ed1-042d-4c3c-aa0d-c3ea84583034n%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/8b2a8ed1-042d-4c3c-aa0d-c3ea84583034n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAPq0zEApzbDkCUhsEGFNx0Xx8tV6V_PQKdCG53bSv%2BUTHObd_Q%40mail.gmail.com.
