If by many years ago you mean you were previously successfully running weewx v4 or earlier (which ran as root) and it broke now using weewx v5 (which runs as a unprivileged user) then that’s the cause. Your unprivileged process tried to write to a privileged location.
If you were previously running weewx v5 and the only change you made was updating your os, then I no ideas here. On Thursday, October 9, 2025 at 12:46:03 PM UTC-7 David Enstrom wrote: > I think something has changed with the WeeWX startup (as daemon) under > Trixie. This is the same error, with a solution: > > https://github.com/gpiozero/gpiozero/discussions/1153 > > I logged the working directory at start up of WeeWX as a daemon: *Current > working directory: /* > This seems rather odd! > > So, when I change it to */tmp/* in my BCRobotics.py driver, and it works > just fine! (i.e., *os.chdir("/tmp/"*) > > I logged the change: > > *Current working directory: /New working directory: /tmp* > > So, it is fixed (WeeWX runs fine), but I am still confused as to the root > cause! Trixie? > On Wednesday, October 8, 2025 at 11:40:28 AM UTC-4 matthew wall wrote: > >> hi david, >> >> perhaps others in this forum could help if you post your driver code, but >> here is a guess: >> >> it looks like your driver is using a file related to gpio (perhaps a >> socket?) whose location is not explicitly specified, so when you run it as >> you the file is in a directory in which you have permissions, but when you >> run it as a daemon (under the control of systemd) the file ends up >> somewhere that you do *not* have permissions. >> >> take a look at your driver code for details about how you do the gpio, >> and see if you can specify the location explicitly, e.g., to /var/tmp or >> /tmp >> >> m >> >> >> > On Oct 8, 2025, at 10:28, David Enstrom <[email protected]> wrote: >> > >> > Just installed Trixie on my Raspberry Pi 3. I created a virtual >> environment and installed Python, required software, and WeeWX using PIP. >> The weather hardware is from BC Robotics, which has worked beautifully for >> many years. I wrote the driver many years ago. >> > >> > My test app runs fine. I can also run WeeWX manually (i.e., activate my >> weeve virtual environment and then run 'weewxd') and it operates just fine. >> However, if I start weewx using the command 'sudo systemctl start weewx' >> and check the system log it does not start properly. I'm very confused by >> the following error in the log: >> > >> > Oct 08 08:35:08 raspberrypi systemd[1]: Started weewx.service - WeeWX >> weather system. >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: INFO __main__: Initializing >> weewxd version 5.1.0 >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: INFO __main__: Command line: >> /home/dave/weeve/lib/python3.13/site-packages/weewxd.py >> /home/dave/weewx-data/weewx.conf >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: INFO __main__: Using Python: >> 3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0] >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: INFO __main__: Located at: >> /home/dave/weeve/bin/python3 >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: INFO __main__: Platform: >> Linux-6.12.47+rpt-rpi-v8-aarch64-with-glibc2.41 >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: INFO __main__: Locale: >> 'en_CA.UTF-8' >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: INFO __main__: Entry path: >> /home/dave/weeve/lib/python3.13/site-packages/weewxd.py >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: INFO __main__: WEEWX_ROOT: >> /home/dave/weewx-data >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: INFO __main__: Config file: >> /home/dave/weewx-data/weewx.conf >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: INFO __main__: User module: >> /home/dave/weewx-data/bin/user >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: INFO __main__: Debug: 0 >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: INFO __main__: User: dave >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: INFO __main__: Group: dave >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: INFO __main__: Groups: adm >> dialout cdrom sudo audio video plugdev games users netdev lpadmin gpio i2c >> spi render input dave >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: INFO weewx.engine: Loading >> station type BCRobotics (user.BCRobotics) >> > Oct 08 08:35:09 raspberrypi python3[4962]: 2025-10-08 08:35:09 >> xCreatePipe: Can't set permissions (436) for //.lgd-nfy0, No such file or >> directory >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: Caught >> OSError: [Errno 2] No such file or directory: '.lgd-nfy-3' >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** >> Traceback (most recent call last): >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** File >> "/home/dave/weeve/lib/python3.13/site-packages/weewxd.py", line 121, in >> main >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** >> engine = weewx.engine.StdEngine(config_dict) >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** File >> "/home/dave/weeve/lib/python3.13/site-packages/weewx/engine.py", line 80, >> in __init__ >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** >> self.setupStation(config_dict) >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** >> ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** File >> "/home/dave/weeve/lib/python3.13/site-packages/weewx/engine.py", line 104, >> in setupStation >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** >> __import__(driver) >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** >> ~~~~~~~~~~^^^^^^^^ >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** File >> "/home/dave/weewx-data/bin/user/BCRobotics.py", line 29, in <module> >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** >> import board >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** File >> "/home/dave/weeve/lib/python3.13/site-packages/board.py", line 51, in >> <module> >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** from >> adafruit_blinka.board.raspberrypi.raspi_40pin import * >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** File >> "/home/dave/weeve/lib/python3.13/site-packages/adafruit_blinka/board/raspberrypi/raspi_40pin.py", >> >> line 6, in <module> >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** from >> adafruit_blinka.microcontroller.bcm283x import pin >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** File >> "/home/dave/weeve/lib/python3.13/site-packages/adafruit_blinka/microcontroller/bcm283x/pin.py", >> >> line 7, in <module> >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** from >> adafruit_blinka.microcontroller.generic_linux.rpi_gpio_pin import Pin >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** File >> "/home/dave/weeve/lib/python3.13/site-packages/adafruit_blinka/microcontroller/generic_linux/rpi_gpio_pin.py", >> >> line 6, in <module> >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** from >> RPi import GPIO >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** File >> "/usr/lib/python3/dist-packages/RPi/GPIO/__init__.py", line 14, in <module> >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** >> import lgpio >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** File >> "/usr/lib/python3/dist-packages/lgpio.py", line 562, in <module> >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** >> _notify_thread = _callback_thread() >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** File >> "/usr/lib/python3/dist-packages/lgpio.py", line 504, in __init__ >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** >> self._file = open('.lgd-nfy{}'.format(self._notify), 'rb') >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** >> ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** >> FileNotFoundError: [Errno 2] No such file or directory: '.lgd-nfy-3' >> > Oct 08 08:35:09 raspberrypi weewxd[4962]: CRITICAL __main__: **** >> Waiting 10 seconds then retrying... >> > >> > HELP!! >> > >> > -- >> > 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 [email protected]. >> > To view this discussion visit >> https://groups.google.com/d/msgid/weewx-user/df68a173-9654-4843-80fb-5b450d76d1cfn%40googlegroups.com. >> >> >> >> -- 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 [email protected]. To view this discussion visit https://groups.google.com/d/msgid/weewx-user/6602870b-15dd-45c9-823d-c7481a5155edn%40googlegroups.com.
