Oops. Parenthesized context expressions are not supported by Python 3.7. I guess I'll be doing a dot-dot release.
-tk On Mon, Mar 2, 2026 at 7:41 PM Alex Edwards <[email protected]> wrote: > Thanks for suggestion. I believe I've already tried that, but tried again > and same result. > > I just tried some Google AI suggestions for debugging dpkg ... > surprisingly useful (scary?). Main conclusion is it suggests changing to > #!/bin/sh > -x in the relevant dpkg install file in /var/lib/dpkg/info/weewx* then > re-run the install / fix. > > This then came up with the following, which looks like a python error? My > python3 is 3.7.3 > > Cheers > > Alex > > Configuring reporting directory /var/www/html/weewx > + mkdir -p /var/www/html/weewx > + set_permissions weewx weewx /var/www/html/weewx > + usr=weewx > + grp=weewx > + dir=/var/www/html/weewx > + find /var/www/html/weewx -type f -exec chmod 664 {} ; > + find /var/www/html/weewx -type d -exec chmod 2775 {} ; > + chown -R weewx:weewx /var/www/html/weewx > + precompile > + python3 -m compileall -q -x user /usr/share/weewx > + rc=*** Error compiling '/usr/share/weewx/weewx/tests/test_daily.py'... > File "/usr/share/weewx/weewx/tests/test_daily.py", line 191 > with (weewx.manager.open_manager_with_config(config_dict, > 'wx_binding') as manager): > > ^ > SyntaxError: invalid syntax > > *** Error compiling '/usr/share/weewx/weewx/tests/test_templates.py'... > File "/usr/share/weewx/weewx/tests/test_templates.py", line 160 > with (open(actual_filename_abs, 'r') as actual, > open(expected_filename_abs, 'r') as expected): > ^ > SyntaxError: invalid syntax > dpkg: error processing package weewx (--configure): > installed weewx package post-installation script subprocess returned > error exit status 1 > Errors were encountered while processing: > weewx > E: Sub-process /usr/bin/dpkg returned an error code (1) > > > > > > On Tuesday, March 3, 2026 at 2:52:26 PM UTC+13 Tom Keffer wrote: > >> I'm not a packaging expert, but could you try: >> >> *sudo apt --fix-broken install* >> *sudo dpkg --configure -a* >> >> >> >> >> On Mon, Mar 2, 2026 at 5:48 PM Alex Edwards <[email protected]> >> wrote: >> >>> Thanks, I believe I already tried that, but tried again and still same >>> error - >>> >>> pi@Pi:~ $ sudo dpkg --configure -a >>> Setting up weewx (5.3.0-1) ... >>> Using weewx:weewx as user:group >>> User pi is already in group weewx >>> Installing udev rules >>> Using configuration file /etc/weewx/weewx.conf >>> Processing configuration file /etc/weewx/weewx.conf >>> Saving configuration file /etc/weewx/weewx.conf >>> Configuring database directory /var/lib/weewx >>> Configuring reporting directory /var/www/html/weewx >>> dpkg: error processing package weewx (--configure): >>> installed weewx package post-installation script subprocess returned >>> error exit status 1 >>> Errors were encountered while processing: >>> weewx >>> >>> I can't find a way to see what exactly is causing the weewx / dpkg >>> failure and error. I've tried a bunch of other things too. >>> >>> On Tuesday, March 3, 2026 at 12:21:34 AM UTC+13 John Smith wrote: >>> >>>> dpkg --configure -a >>>> >>>> On Mon, 2 Mar 2026 at 22:12, Alex Edwards <[email protected]> >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> I'm having trouble getting this to update from 5.0.2 on Raspberry Pi. >>>>> Partly my terminal disconnected part-way through. >>>>> >>>>> I've tried Googling, and tried numerous Apt Remove, Purge, Clean etc >>>>> variants. I've also found a few previous posts with similar weewx topics, >>>>> but none helped. >>>>> >>>>> On install - >>>>> >>>>> The following NEW packages will be installed: >>>>> weewx >>>>> 0 upgraded, 1 newly installed, 0 to remove and 608 not upgraded. >>>>> Need to get 0 B/1,564 kB of archives. >>>>> After this operation, 5,742 kB of additional disk space will be used. >>>>> Preconfiguring packages ... >>>>> Selecting previously unselected package weewx. >>>>> (Reading database ... 164040 files and directories currently >>>>> installed.) >>>>> Preparing to unpack .../archives/weewx_5.3.0-1_all.deb ... >>>>> Unpacking weewx (5.3.0-1) ... >>>>> Setting up weewx (5.3.0-1) ... >>>>> Using weewx:weewx as user:group >>>>> Installing udev rules >>>>> Using configuration file /etc/weewx/weewx.conf >>>>> Processing configuration file /etc/weewx/weewx.conf >>>>> Saving configuration file /etc/weewx/weewx.conf >>>>> Configuring database directory /var/lib/weewx >>>>> Configuring reporting directory /var/www/html/weewx >>>>> dpkg: error processing package weewx (--configure): >>>>> installed weewx package post-installation script subprocess returned >>>>> error exit status 1 >>>>> Errors were encountered while processing: >>>>> weewx >>>>> E: Sub-process /usr/bin/dpkg returned an error code (1) >>>>> >>>>> Running weewxd works, but as a daemon doesn't work. >>>>> >>>>> sudo systemctl start weewx >>>>> Failed to start weewx.service: Unit weewx.service not found. >>>>> >>>>> I can't find anything obvious in any log files in /var/log or what >>>>> caused the errror. >>>>> >>>>> Any help appreciated. >>>>> >>>>> Oh, while uninstalling and reinstalling, I accidentally ran weewx in >>>>> Simulator mode rather than the previous config file. This created some >>>>> duff data in my reports. It could be good if weewx needed to be "forced" >>>>> to run if the last database station_type differs from the current config >>>>> file station_type, or if the process tries to create new database "fields" >>>>> implying a change of station_type. I may have to find a way to clean out >>>>> this Simulator data. >>>>> >>>>> Thanks >>>>> >>>>> Alex >>>>> >>>>> On Monday, March 2, 2026 at 12:43:11 PM UTC+13 Tom Keffer wrote: >>>>> >>>>>> Available in the usual places. No breaking changes (that I know of!) >>>>>> >>>>>> See the Upgrade Guide <https://www.weewx.com/docs/5.3/upgrade/> for >>>>>> how to upgrade. >>>>>> >>>>>> >>>>>> *Change log* >>>>>> >>>>>> Set log-label in sysV init script to 'weewxd-XXX' instead of just >>>>>> 'XXX' >>>>>> >>>>>> Added rsyslog config example for making logs visible to the group >>>>>> weewx without having to use any privilege escalation. >>>>>> >>>>>> Allow extra command line options to be passed to an extension >>>>>> installer. Addresses Issue #1041 >>>>>> <https://github.com/weewx/weewx/issues/1041>. >>>>>> >>>>>> Added Astronomical Units as a unit of length. Added local_djd as a >>>>>> unit of *local* time. PR #998 >>>>>> <https://github.com/weewx/weewx/pull/998>. Thanks to user Karen! >>>>>> >>>>>> Moved database-specific code into the weedb module. This is in >>>>>> anticipation of allowing new databases to be installed as an extension. >>>>>> >>>>>> New action weectl database rebuild-daily NAME was added to allow the >>>>>> selective rebuilding of the daily summaries. Addresses Issue #1035 >>>>>> <https://github.com/weewx/weewx/issues/1035>. >>>>>> >>>>>> New action weectl station list-drivers was added to allow the >>>>>> listing of all available device drivers. Fixes Issue #1050 >>>>>> <https://github.com/weewx/weewx/issues/1060>. >>>>>> >>>>>> Language subdirectory lang is now recursively searched for >>>>>> additional translation files. This allows extensions to add any >>>>>> translations they might need. >>>>>> >>>>>> Converted test suites to use pytest <https://pytest.org/>. >>>>>> >>>>>> New Finish translation for the Seasons skin. Thanks to user iiseppi! PR >>>>>> #1059 <https://github.com/weewx/weewx/pull/1059>. >>>>>> >>>>>> Remove unnecessary UNIQUE index on PRIMARY KEY columns in SQLite, >>>>>> achieving size reduction of ~10%. Existing database schemas are not >>>>>> modified. Users desiring size reduction are advised to consider manually >>>>>> migrating. >>>>>> >>>>>> Fix problem that prevented weectl database reconfigure from working >>>>>> in cases where a schema was specified. >>>>>> >>>>>> Fix problem when importing data into a MySQL database. PR #1025 >>>>>> <https://github.com/weewx/weewx/pull/1025>. Thanks to user Robert! >>>>>> >>>>>> Fix problem that prevented weewxd from restarting reliably if a >>>>>> MySQL connection was lost. Fixes Issue #1036 >>>>>> <https://github.com/weewx/weewx/issues/1036>. >>>>>> >>>>>> Add support for kwargs when using .series() tags. PR #1042 >>>>>> <https://github.com/weewx/weewx/pull/1042>. >>>>>> >>>>>> Documentation now uses Zensical <https://zensical.org/>. >>>>>> >>>>>> Fix problem that caused expanded substitutions to be saved when using >>>>>> weectl >>>>>> station reconfigure. Fixes Issue #1068 >>>>>> <https://github.com/weewx/weewx/issues/1068>. >>>>>> >>>>> -- >>>>> 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 visit >>>>> https://groups.google.com/d/msgid/weewx-user/e2b33a72-6cbc-44a3-87e6-e2d0fe57726en%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/weewx-user/e2b33a72-6cbc-44a3-87e6-e2d0fe57726en%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 visit >>> https://groups.google.com/d/msgid/weewx-user/cd728895-95f5-4fc6-b739-62c491490f3bn%40googlegroups.com >>> <https://groups.google.com/d/msgid/weewx-user/cd728895-95f5-4fc6-b739-62c491490f3bn%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 visit > https://groups.google.com/d/msgid/weewx-user/581b2f5a-cd70-4efd-81cf-4dd090b30dc2n%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/581b2f5a-cd70-4efd-81cf-4dd090b30dc2n%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 visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEB%2BPM780xXO8257QA%2Br7uW1nAy3XyyVXdfLOaJ-ZjtfJA%40mail.gmail.com.
