Upgrade from 4.5.1 to 4.8.0 Critical Error

110 views
Skip to first unread message

Dave McCreath

unread,
Apr 25, 2022, 6:45:02 AM4/25/22
to weewx-user
Good Morning.

My system runs on a Mk4 RPI using Debian Buster.

I'll start by saying that I'm not confident using Linux at all, but I try my best.

I upgraded my system to 4.5.1 a month after it came out and I had a similar issue to this one so rolled back using a back up.  Tried again a couple of weeks later and all went well using the repopulated 4.5.1 .conf file.

Last night I tried to upgrade the whole RPI system again which included the upgrade to WeeWX  4.8.0.  I used sudo apt update, followed by sudo apt upgrade.  I was asked as part of the process to either accept or decline the new .conf file.  I accepted, repopulated the new .conf file with the correct data and then rebooted the system.  WeeWX failed to start properly (see below).  I then tried again, this time opting to retain the 4.5.1 .conf file, this also failed.  I'm now back up and running on a backup of the system prior to upgrading and all is well.

Here is a snapshot of the syslog during the upgrade (this mornings attempt that also failed), appears to be OK?:

Apr 25 11:08:17 raspberrypi systemd[1]: Stopping LSB: weewx weather system...

Apr 25 11:08:17 raspberrypi weewx[1578] INFO __main__: Received signal TERM (15).

Apr 25 11:08:17 raspberrypi weewx[1578] INFO weewx.engine: Main loop exiting. Shutting engine down.

Apr 25 11:08:17 raspberrypi weewx[1578] INFO weewx.engine: Shutting down StdReport thread

Apr 25 11:08:17 raspberrypi weewx[1578] INFO __main__: Terminating weewx version 4.5.1

Apr 25 11:08:17 raspberrypi weewx[26729]: Stopping weewx weather system: weewx.

Apr 25 11:08:17 raspberrypi systemd[1]: weewx.service: Succeeded.

Apr 25 11:08:17 raspberrypi systemd[1]: Stopped LSB: weewx weather system.

And this is a snapshot of the syslog after the upgrade, I get the same error with either the 4.5.1 or 4.8.0 .conf file:

Apr 25 11:22:06 raspberrypi weewx[30659] INFO __main__: Received signal TERM (15).

Apr 25 11:22:06 raspberrypi weewx[30659] INFO weewx.engine: Main loop exiting. Shutting engine down.

Apr 25 11:22:06 raspberrypi weewx[30659] INFO weewx.engine: Shutting down StdReport thread

Apr 25 11:22:06 raspberrypi weewx[30659] INFO __main__: Terminating weewx version 4.8.0

Apr 25 11:22:06 raspberrypi weewx[2733]: Stopping weewx weather system: weewx.

Apr 25 11:22:06 raspberrypi systemd[1]: weewx.service: Succeeded.

Apr 25 11:22:06 raspberrypi systemd[1]: Stopped LSB: weewx weather system.

Apr 25 11:22:18 raspberrypi systemd[1]: Starting LSB: weewx weather system...

Apr 25 11:22:18 raspberrypi weewx[2841] INFO __main__: Initializing weewx version 4.8.0

Apr 25 11:22:18 raspberrypi weewx[2841] INFO __main__: Using Python 3.7.3 (default, Jan 22 2021, 20:04:44) #012[GCC 8.3.0]

Apr 25 11:22:18 raspberrypi weewx[2841] INFO __main__: Platform Linux-5.10.63-v7l+-armv7l-with-debian-10.12

Apr 25 11:22:18 raspberrypi weewx[2841] INFO __main__: Locale is 'en_GB.UTF-8'

Apr 25 11:22:18 raspberrypi weewx[2841] INFO __main__: Using configuration file /etc/weewx/weewx.conf

Apr 25 11:22:18 raspberrypi weewx[2841] INFO __main__: Debug is 0

Apr 25 11:22:18 raspberrypi weewx[2841] INFO __main__: PID file is /var/run/weewx.pid

Apr 25 11:22:18 raspberrypi weewx[2845] CRITICAL __main__: Caught unrecoverable exception:

Apr 25 11:22:18 raspberrypi weewx[2845] CRITICAL __main__:     ****  'unspecified'

Apr 25 11:22:18 raspberrypi weewx[2845] CRITICAL __main__:     ****  Traceback (most recent call last):

Apr 25 11:22:18 raspberrypi weewx[2845] CRITICAL __main__:     ****    File "/usr/share/weewx/weewxd", line 147, in main

Apr 25 11:22:18 raspberrypi weewx[2845] CRITICAL __main__:     ****      engine = weewx.engine.StdEngine(config_dict)

Apr 25 11:22:18 raspberrypi weewx[2845] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 81, in __init__

Apr 25 11:22:18 raspberrypi weewx[2845] CRITICAL __main__:     ****      self.setupStation(config_dict)

Apr 25 11:22:18 raspberrypi weewx[2845] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 103, in setupStation

Apr 25 11:22:18 raspberrypi weewx[2845] CRITICAL __main__:     ****      driver = config_dict[station_type]['driver']

Apr 25 11:22:18 raspberrypi weewx[2845] CRITICAL __main__:     ****    File "/usr/lib/python3/dist-packages/configobj.py", line 554, in __getitem__

Apr 25 11:22:18 raspberrypi weewx[2845] CRITICAL __main__:     ****      val = dict.__getitem__(self, key)

Apr 25 11:22:18 raspberrypi weewx[2845] CRITICAL __main__:     ****  KeyError: 'unspecified'

Apr 25 11:22:18 raspberrypi weewx[2845] CRITICAL __main__:     ****  Exiting.

Apr 25 11:22:18 raspberrypi weewx[2830]: Starting weewx weather system: weewx.

Apr 25 11:22:18 raspberrypi systemd[1]: Started LSB: weewx weather system.

Can anyone with more knowledge than I give me an idea of what I'm dong wrong?


Many, many thanks.


Dave


Tom Keffer

unread,
Apr 25, 2022, 7:00:45 AM4/25/22
to weewx-user
For some reason, your configuration file is not getting set up for the specific weather station and driver you are using. 

Perhaps you can give us some details about what you mean by, "repopulated the new .conf file with the correct data"? Did you do this by hand?

If it happens again, you can try to reconfigure by using the utility wee_config:

wee_config --reconfigure

It will prompt you for information about your station, including which driver to use.

-tk

--
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 on the web visit https://groups.google.com/d/msgid/weewx-user/33fa1974-20a4-420b-932a-751d2303978an%40googlegroups.com.

Dave McCreath

unread,
Apr 25, 2022, 9:58:36 AM4/25/22
to weewx-user
Tom

Many thanks for getting back to me with the suggestion.  I've just done a full system upgrade (again), and it worked first time.  I've no idea what happened.  To the best of my knowledge I've done nothing different to the other occasions I tried to upgrade, however, the SD card used this afternoon was a new one.  That may have been the issue.

Thank you

Dave

Reply all
Reply to author
Forward
0 new messages