the error is a not complete compatibility of the interceptor version and Python3. Never mind.
However, before we start messing up - and before you start a complete re-install of the OS (operating system) - what you call a re-install of the RPi - I suggest you first do a complete new re-install of weewx.
For this you better make BEFOREHAND a copy of the /etc/weewx directory (with weewx.conf, Skins etc.) and of the /var/lib/weewx directory (database)
If you have made changes to extensions.py in /usr/share/weewx/user then save this directory also.
interceptor.py which resides also in /usr/share/weewx/user will not be needed - you better install the latest version from GitHub.
(
https://github.com/matthewwall/weewx-interceptor)
in a RPi console window:
sudo mkdir /home/pi/weewx
sudo cp -R /etc/weewx /home/pi/weewx/etc/weewx
sudo cp -R /var/lib/weewx /home/pi/weewx/var/lib/weewx
sudo cp -R /usr/share/weewx/user /home/pi/weewx/usr/share/weewx/user
after that all your important files are saved to /home/pi/weewx
to be on the safe side and, if you want to the re-install of the RPi, copy these files also to an external USB stick.
in the text below all comments will start with #, all other lines are OS commands to be executed in the RPi console
(depending on your RPi OS the USB stick, when inserted, will be automatically mounted into /media/pi - you will be asked if you want that - then it's your choice to either accept it or reject and do the mounting described below yourself - if it's mounted to /media/pi the commands below will need to be modified accordingly for the paths)
# Make sure the USB stick is formatted FAT32.#
# execute the command below:
ls /dev/sd* -l (that's the lowercase "L""
)
# all external "special devices" (e.g. USB stick, external USB disk ...) will be shown as
sda (+sda1 if the device has 2 partitions)
sdb .... etc - if you have no external device attached, the command will show nothing
# Now insert the USB stick and execute the command again
ls /dev/sd* -l
# now at least one entry (depedending on what was shown earlier) will be shown - most likely sda and sda1 or sda only
# now we make the USB stick available to the file system, i.e. we mount it into an existing directory of the file system:
sudo mkdir /mnt/USB
sudo mount /dev/sda1 /mnt/USB
# now the USB stick is known to the OS as /mnt/USB
# copy the files as backup onto the USB stick
sudo cp -R /home/pi/weewx /mnt/USB
# this will copy the all your weewx files with important content (weewx.conf, skins etc + the weewx database) to your USB stick
now go to weewx.com and look up how to uninstall weewx completely.
Do it - afterwards look up how to install weewx with python3 - do it.
download and install the latest version of the interceptor driver from GitHub
before you start weewx for the first time, copy your saved data back:
sudo cp -R /home/pi/weewx/etc/weewx /etc/weewx
sudo cp -R /home/pi/weewx/var/lib/weewx /var/lib/weewx
(don't touch the /home/pi/weewx/usr/share/weewx/user directory - we may not need it (or mess up the interceptor driver installation if we copy it back now)
now start weewx and see if it behaves properly (archives data, shows reports on the skin after an archiving cycle)
sudo /etc/init.d/weewx start
Only if all this doesn't produce the desired result, you can re-install your RPi new from scratch - the weewx data you need will be on your USB stick - and can be copied back the same way as we copied them on:
BEFORE install weewx with python3 and the interceptor driver,
then
- insert the USB stick
- identify the device-name (e.g. sda1) with ls /dev/sd* -l
- create a moint point (=directory where the USB stick will be mounted into the file system): sudo mkdir /mnt/USB
- mount the stick: sudo mount /dev/device-name (replace "device-name" by what you found with ls /dev/sd* -l)
- copy your files back:
sudo cp -R /mnt/USB/weewx/etc/weewx /etc/weewx
sudo cp -R /mnt/USB/weewx/var/lib/weewx /var/lib/weewx
Good luck !