weewx installation failure on Raspberry Pi

138 views
Skip to first unread message

John Mora

unread,
Dec 16, 2020, 2:26:51 PM12/16/20
to weewx-user
Hello, I am attempting to install weewx on my Raspberry Pi 4 8G. I follow the instructions in the manual: http://weewx.com/docs/debian.htm
I log in to the system using the same user/credentials as when I installed PiHole and Unbound which installed and ran without any issues.
When the weewx installation completes, the service fails to start and there appears to be folders/files missing.

Here is the console output from the installation process, the output of "systemctl status weewx.service" and "journalctl -u weewx"

pi@raspberrypi1:~ $ cat /etc/issue
Raspbian GNU/Linux 10 \n \l

pi@raspberrypi1:~ $ python --version
Python 2.7.16

pi@raspberrypi1:~ $ sudo wget -qO - http://weewx.com/keys.html | sudo apt-key add -
OK

pi@raspberrypi1:~ $ sudo wget -qO - http://weewx.com/apt/weewx-python2.list | sudo tee /etc/apt/sources.list.d/weewx.list
deb [arch=all] http://weewx.com/apt/python2 squeeze main

pi@raspberrypi1:~ $ sudo apt-get update
Hit:1 http://weewx.com/apt/python2 squeeze InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Get:3 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Fetched 15.0 kB in 1s (11.5 kB/s)
Reading package lists... Done
pi@raspberrypi1:~ $ sudo apt-get install weewx
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  lxplug-volume
Use 'sudo apt autoremove' to remove it.
Suggested packages:
  sqlite ftp
The following NEW packages will be installed:
  weewx
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,207 kB of archives.
After this operation, 5,327 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package weewx.
(Reading database ... 100745 files and directories currently installed.)
Preparing to unpack .../archives/weewx_4.2.0-1_all.deb ...
Unpacking weewx (4.2.0-1) ...
Setting up weewx (4.2.0-1) ...
Job for weewx.service failed because the control process exited with error code.
See "systemctl status weewx.service" and "journalctl -xe" for details.
invoke-rc.d: initscript weewx, action "start" failed.
● weewx.service - LSB: weewx weather system
   Loaded: loaded (/etc/init.d/weewx; generated)
   Active: failed (Result: exit-code) since Wed 2020-12-16 13:48:44 EST; 22ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 10601 ExecStart=/etc/init.d/weewx start (code=exited, status=1/FAILURE)

Dec 16 13:48:43 raspberrypi1 systemd[1]: Starting LSB: weewx weather system...
Dec 16 13:48:44 raspberrypi1 weewx[10601]: Starting weewx weather system: weewxTraceback (most recent call last):
Dec 16 13:48:44 raspberrypi1 weewx[10601]:   File "/usr/share/weewx/weewxd", line 28, in <module>
Dec 16 13:48:44 raspberrypi1 weewx[10601]:     import user.extensions
Dec 16 13:48:44 raspberrypi1 weewx[10601]: ImportError: No module named extensions
Dec 16 13:48:44 raspberrypi1 weewx[10601]:  failed!
Dec 16 13:48:44 raspberrypi1 systemd[1]: weewx.service: Control process exited, code=exited, status=1/FAILURE
Dec 16 13:48:44 raspberrypi1 systemd[1]: weewx.service: Failed with result 'exit-code'.
Dec 16 13:48:44 raspberrypi1 systemd[1]: Failed to start LSB: weewx weather system.
dpkg: error processing package weewx (--configure):
 installed weewx package post-installation script subprocess returned error exit status 1
Processing triggers for systemd (241-7~deb10u5+rpi1) ...
Errors were encountered while processing:
 weewx
E: Sub-process /usr/bin/dpkg returned an error code (1)

pi@raspberrypi1:~ $ sudo systemctl status weewx.service
● weewx.service - LSB: weewx weather system
   Loaded: loaded (/etc/init.d/weewx; generated)
   Active: failed (Result: exit-code) since Wed 2020-12-16 13:48:44 EST; 8min ag
     Docs: man:systemd-sysv-generator(8)

Dec 16 13:48:43 raspberrypi1 systemd[1]: Starting LSB: weewx weather system...
Dec 16 13:48:44 raspberrypi1 weewx[10601]: Starting weewx weather system: weewxT
Dec 16 13:48:44 raspberrypi1 weewx[10601]:   File "/usr/share/weewx/weewxd", lin
Dec 16 13:48:44 raspberrypi1 weewx[10601]:     import user.extensions
Dec 16 13:48:44 raspberrypi1 weewx[10601]: ImportError: No module named extensio
Dec 16 13:48:44 raspberrypi1 weewx[10601]:  failed!
Dec 16 13:48:44 raspberrypi1 systemd[1]: weewx.service: Control process exited,
Dec 16 13:48:44 raspberrypi1 systemd[1]: weewx.service: Failed with result 'exit
Dec 16 13:48:44 raspberrypi1 systemd[1]: Failed to start LSB: weewx weather syst
lines 1-14/14 (END)


pi@raspberrypi1:~ $ journalctl -u weewx
-- Logs begin at Wed 2020-12-16 08:39:43 EST, end at Wed 2020-12-16 14:11:41 EST. --
Dec 16 13:48:43 raspberrypi1 systemd[1]: Starting LSB: weewx weather system...
Dec 16 13:48:44 raspberrypi1 weewx[10601]: Starting weewx weather system: weewxTraceback (most recent call last):
Dec 16 13:48:44 raspberrypi1 weewx[10601]:   File "/usr/share/weewx/weewxd", line 28, in <module>
Dec 16 13:48:44 raspberrypi1 weewx[10601]:     import user.extensions
Dec 16 13:48:44 raspberrypi1 weewx[10601]: ImportError: No module named extensions
Dec 16 13:48:44 raspberrypi1 weewx[10601]:  failed!
Dec 16 13:48:44 raspberrypi1 systemd[1]: weewx.service: Control process exited, code=exited, status=1/FAILURE
Dec 16 13:48:44 raspberrypi1 systemd[1]: weewx.service: Failed with result 'exit-code'.
Dec 16 13:48:44 raspberrypi1 systemd[1]: Failed to start LSB: weewx weather system.


Any assistance would be awesome. If any other information is needed please ask and also keep in mind I am a bit of a newb at this, meaning "Explain like I am a 5 yesr old"

Thanks in advance.

Tom Keffer

unread,
Dec 16, 2020, 3:54:09 PM12/16/20
to weewx-user
1. Any particular reason why you're trying to use Python 2 on a Debian 10 system? Normally, the expectation is that Deb 10 (buster) users would be using Python 3.

2. What is the results of

ls -l /usr/share/weewx

3. What is the results of 

ls -l /usr/share/weewx/user


--
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/857bce3a-bcc4-40fd-b1de-9f722dfbf031n%40googlegroups.com.

vince

unread,
Dec 16, 2020, 4:13:32 PM12/16/20
to weewx-user
aaaah - he used the python2 instructions, not the python3 instructions.
Might be easier to just delete the package and follow the python3 instructions which will get him the python3 package.

John Mora

unread,
Dec 16, 2020, 4:20:23 PM12/16/20
to weewx-user
Thanks for the response. The reason I used the python 2 directions was pure user error.

I retried using the python 3 instructions and was much more successful, although am still getting an error, but it appears that the it can't open a port to connect to the weatherlink live device.

Dec 16 15:55:52 raspberrypi1 weewx[19487] CRITICAL weewx.engine:     ****    File "/usr/share/weewx/weewx/drivers/vantage.py", line 344, in openPort
Dec 16 15:55:52 raspberrypi1 weewx[19469]: Starting weewx weather system: weewx.
Dec 16 15:55:52 raspberrypi1 weewx[19487] CRITICAL weewx.engine:     ****      raise weewx.WeeWxIOError(ex)
Dec 16 15:55:52 raspberrypi1 systemd[1]: Started LSB: weewx weather system.
Dec 16 15:55:52 raspberrypi1 weewx[19487] CRITICAL weewx.engine:     ****  weewx.WeeWxIOError: [Errno 111] Connection refused
Dec 16 15:55:52 raspberrypi1 weewx[19487] CRITICAL __main__: Unable to load driver: [Errno 111] Connection refused
Dec 16 15:55:52 raspberrypi1 weewx[19487] CRITICAL __main__:     ****  Exiting...

vantage.py relevant snippet:

    def openPort(self):
        import socket
        try:
            self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            self.socket.settimeout(self.timeout)
            self.socket.connect((self.host, self.port))
        except (socket.error, socket.timeout, socket.herror) as ex:
            log.error("Socket error while opening port %d to ethernet host %s.", self.port, self.host)
            # Reraise as a weewx I/O error:
            raise weewx.WeeWxIOError(ex)
        except:
            log.error("Unable to connect to ethernet host %s on port %d.", self.host, self.port)
            raise
        log.debug("Opened up ethernet host %s on port %d. timeout=%s, tcp_send_delay=%s",
                  self.host, self.port, self.timeout, self.tcp_send_delay)

Any direction as to why?

Thanks!

Tom Keffer

unread,
Dec 16, 2020, 4:29:30 PM12/16/20
to weewx-user
It appears that you are trying to use the WeatherLink iP logger.

Are you sure that's what you want? Most people have serial or USB loggers. The WLIP logger is not made any longer.

-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.

John Mora

unread,
Dec 16, 2020, 4:35:48 PM12/16/20
to weewx-user
Thank you for the response and your patience.

I am using the new WeatherLink Live connected via Ethernet cable directly to my router. I am able to ping the device from the Raspberry Pi and even use the browser to show current conditions via JSON.

It is currently configured and working as expected. It is sending information to weatherlink.com.

Tom Keffer

unread,
Dec 16, 2020, 4:59:25 PM12/16/20
to weewx-user
I see. The WLL logger is not a supported logger, so you'll have to install an extension for it. There are several listed on the Wiki.

-tk

John Mora

unread,
Dec 16, 2020, 5:04:28 PM12/16/20
to weewx-user
AHA! Yes, I understand. I just read into the extension for it. I will install the appropriate extension and move forward.
Thank you for your time, it is highly appreciated.
If I run into an issue with the extension and getting it to work, I will start a new thread.

Cheers!
John
Reply all
Reply to author
Forward
0 new messages