weewx doesn't start after upgrade to fedoar 39

715 views
Skip to first unread message

Lee Holstege

unread,
Nov 10, 2023, 3:12:16 PM11/10/23
to weewx-user
I have happily used weewx for many years.  Earlier this week I upgraded my system from fedora 38 to fedora 39.  The upgrade was uneventful. However weewx will no longer start.  Everyting else seems to work normally.  Setting debug=1 in the config file made no difference.
The log output is

 Traceback (most recent call last):
 File "/usr/share/weewx/weewxd", line 22, in <module>
    import weecfg
"/usr/share/weewx/weecfg/__init__.py", line 21, in <module>
   from six.moves import StringIO, input
ModuleNotFoundError: No module named 'six.moves'
 weewx[53224]: [FAILED]
 weewx.service: Control process exited, code=exited, status=1/FAILURE
weewx.service: Failed with result 'exit-code'.
 Failed to start weewx.service - SYSV: start and stop the weewx weather system.

Looked pretty simple at first.  Missing file six.moves.   Just replace missing file and move on.

Now I have learned  "six" is actually a compatibility library designed to allow seamless detection between Python2 and Python3 and that the routine (dynamically?) creates the missing file six.moves.  So it appears that the proper file either i not being created at all or is not being imported correctly.  I am running Python3.12.

I have worked on this for the past couple of days and have made no progress.  I am not even sure whether the problem is in weewx or python.  I would appreciate any help that anyone may be able to provide.

Admin details:
weewx installed and upgraded from rpms downloaded from the weewx website
Current version is weewx-4.10.2-1.el8.noarch
Fedora 39 upgrade (earlier this week) and then updated again this morning
Weather station Davis Vantage Vue



 

vince

unread,
Nov 10, 2023, 4:19:14 PM11/10/23
to weewx-user
You might be blocked by os/python hell (long answer follows) but I think it's more like unrealistic expectations perhaps.  You're trying to run a bleeding edge os with a legacy weewx that wasn't tested on that os version of course since that os/version didn't exist back then.

[...TL;DR;...]

Fedora39 looks like it's a bit of a mess vs. old apps like weewx v4 that were intended for older redhat-ish os versions.
  • The weewx v4 rpms are signed with a crypto version Fedora doesn't permit any more so you can't import the rpm keys
  • Installing on a clean F39 system after manually downloading the rpm fails because of lack of python3-six being installed
  • but even after doing that it fails because Fedora ripped out the old /etc/init.d plumbing it seems that the weewx v4 rpm relies on
  • and if you try to delete weewx, that fails too (seems like there are many F39 bugs along these lines) but a force reinstall with rpm got  it back to weewx seemingly installed but it doesn't run due to the six issue you ran even though python3-six 'was' installed.  Ugh.
I tried v5 current beta using pip in a vagrant vm of fedora39 and it does install and run interactively, but I'm getting permission-denied trying to start the daemon with systemd.  I didn't look into it any further.  The exec stanza is correct in the weewx.service file, but it doesn't run via systemctl.  I hate systemd.

I also tried v4 via setup.py on F39 and that also failed with the six.moves error.

$ sudo python3 ./setup.py install
Traceback (most recent call last):
  File "/home/weewx/bin/wee_config", line 12, in <module>
    from weecfg.config import ConfigEngine, Logger
  File "/home/weewx/bin/weecfg/__init__.py", line 21, in <module>

    from six.moves import StringIO, input
ModuleNotFoundError: No module named 'six.moves'

Note that I 'did' have python3-six rpm installed v1.16.0 from rpm.  I manually installed 1.15.0 with pip but it still fails the same way.

I do not see a combination that will work other than moving from v4-rpm to v5beta-pip installation mechanism and moving a lot of stuff around manually.  There's no v5 weewx rpm at this time.

Lee Holstege

unread,
Nov 10, 2023, 4:31:19 PM11/10/23
to weewx-user
UGH.  Thanks so much for the quick and insightful reply.  I have everything totally backed up and may try just reverting back to 38 unless I find another solution .  Any idea when weeex v5 rpms might be available?

Tom Keffer

unread,
Nov 10, 2023, 5:51:39 PM11/10/23
to weewx...@googlegroups.com
I would guess that you're actually using a different version of Python 3 after the upgrade than the one you used before. Try installing the prerequisites again. Hopefully they have been updated along with the version of Python 3.



--
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/7808dcfe-f7bb-4bfc-8604-3c0479da7363n%40googlegroups.com.

bell...@gmail.com

unread,
Nov 10, 2023, 9:38:12 PM11/10/23
to weewx-user
When I added Python 3.12 to my automated tests of MQTTSubscribe I saw this.  I did minimal digging and found this, https://bugzilla.mozilla.org/show_bug.cgi?id=1857492.
Perhaps updating the six.py that WeeWX ships might fix it… With WeeWX v5 imminent (?)… I decided that MQTTSubscribe doesn’t support python 3.12.
I’d try using Python 3.11.
rich

vince

unread,
Nov 10, 2023, 10:27:44 PM11/10/23
to weewx-user
Yeah - many such threads here and there.  I did try reverting 'six' via pip to 1.15.0 on F39 but it didn't help.  Somebody upstream has some serious breakage.  (I didn't try python-3.12 but this might be one of those places where you can break the os potentially if you tried to install it in a system location.  Yet another reason the new venv/pip stuff is great)

bell...@gmail.com

unread,
Nov 11, 2023, 5:29:10 AM11/11/23
to weewx-user
Sorry I wasn't clear. I was wondering what would happen if the 1.15 version of six.py in the WeeWX bin directory was updated to 1.16.

FWIW: MQTTSubscribe test on Ubuntu 22.04, Python 3.12 fails. If I delete six.py from WeeWX bin directory it passes.
rich

vince

unread,
Nov 11, 2023, 1:54:35 PM11/11/23
to weewx-user
That actually works on fedora39.  Great find ! 
Simply remove the six.py that weewx v4 installs.

# install weewx the hard way because
# the rpm signing key is not accepted 
# by modern fedora 39
sudo yum install -y wget
wget http://weewx.com/downloads/released_versions/weewx-4.10.2-1.el8.noarch.rpm
sudo yum localinstall weewx-4.10.2-1.el8.noarch.rpm

# get weewx's six.py out of the way
cd /usr/share/weewx/
sudo mv six.py six.py.keepme

# set debug=1 and save the file
sudo vi /etc/weewx/weewx.conf

# make sure it's running simulator
sudo wee_config --reconfigure

# start it up interactively
sudo weewxd


Lee Holstege

unread,
Nov 11, 2023, 4:05:42 PM11/11/23
to weewx-user
WOW  That worked. Just remove the six.py  file restart, and all seems to be fine.  And here I was afraid I was going to have to revert to FC38.  THANK YOU ALL!

Jose Maria T.J.

unread,
Dec 28, 2023, 2:32:58 PM12/28/23
to weewx-user
This worked for me, thanks!

I had weewx already installed in F38, so no needed to install the RPM.

silke

unread,
May 27, 2024, 6:40:17 AM5/27/24
to weewx-user
Hey, just as an additional info:

I just upgraded my Ubuntu to 24.04 LTS  (running weewx 5.0.2) and ran into exactly the same issue. Thanks to this thread I was saved! :-)

Thank you all for providing this solution.
Reply all
Reply to author
Forward
0 new messages