Hello all,
I have been successfully running the following versions of weewx software, skins and python on Debian 10 and I need to upgrade the software as depicted here:
- weewx current version 3.9.2 needs upgrading to 4.2.0.
- Belchertown Skin current version 1.0.1 needs upgrading to 1.2
- Weather34 Skin current version WX-UB40-IHVN-0.9.1 needs upgrading toW34-HC-IMJD-3.0.0
- Python current version 2.7 needs upgrading to Python 3.7.3
As an FYI, weewx is installed from the Debian weewx package with the Debian package manager, apt.
What is the recommended order for performing these upgrades?
My initial thoughts were to upgrade in this order:
- Upgrade Python to version 3.7.3
- Upgrade weew to version 4.2.0
- Upgrade the Belchertown skin to verion 1.2
- Upgrade the Weather34 skin to version W34-HC-IMJD-3.0.0
So, I began the python upgrade by installing python 3.7.3 and the python3 dependencies: python3-configobj
python3-pil python3-serial, python3-usb, python3-pip, python3-cheetah, python3-ephem, python3-mysqldb.
I then used the update-alternatives package to switch the default python command to python 3.7.3. Then, after I started the weewx service with "systemctl restart weewx", the command "systemctl status weewx" generates the following error dialog:
● weewx.service - LSB: weewx weather system
Loaded: loaded (/etc/init.d/weewx; generated)
Active: active (exited) since Mon 2020-12-07 09:12:53 EST; 7s ago
Docs: man:systemd-sysv-generator(8)
Process: 28868 ExecStart=/etc/init.d/weewx start (code=exited, status=0/SUCCESS)
Dec 07 09:12:53 zeebytes.org weewx[28868]: Starting weewx weather system: weewxTraceback (most recent call last):
Dec 07 09:12:53 zeebytes.org weewx[28868]: File "/usr/bin/weewxd", line 64, in <module>
Dec 07 09:12:53 zeebytes.org weewx[28868]: weewx.engine.main(options, args)
Dec 07 09:12:53 zeebytes.org weewx[28868]: File "/usr/share/weewx/weewx/engine.py", line 845, in main
Dec 07 09:12:53 zeebytes.org weewx[28868]: daemon.daemonize(pidfile=options.pidfile)
Dec 07 09:12:53 zeebytes.org weewx[28868]: File "/usr/share/weewx/daemon.py", line 71, in daemonize
Dec 07 09:12:53 zeebytes.org weewx[28868]: si = file(stdin, 'r')
Dec 07 09:12:53 zeebytes.org weewx[28868]: NameError: name 'file' is not defined
Dec 07 09:12:53 zeebytes.org weewx[28868]: .
Dec 07 09:12:53 zeebytes.org systemd[1]: Started LSB: weewx weather system.
I researched "NameError: name 'file' is not defined" and found a reference that stated that file() is not supported in Python3. Is that the problem and if so, how do I fix it? Otherwise, how do I get my existing weewx 3.9.2 installation to run Python3 or do I need to upgrade weewx to 4.2.0 for it to work with python3?
Any comments on the best way to perform these upgrades would be most appreciated.
Thanks,
Gordon