Thanks for the ideas.
Found this solutions, too ... but non if it worked.
I will try to uninstall weewx as debian pacekt and try installing it in
a venv, maybe more luck...
Regards,
Christian
Am 06.07.26 um 06:04 schrieb Susan Mackay:
> I am certainly no believer in AI so please treat this with all due
> caution...
>
> I was intrigued to know what 'ldg-nfy0' was so I Googled it. The AI summary
> provided:
>
> ```
> .lgd-nfy0 is a temporary named pipe file created by the lgpio Python
> library, which is commonly used on Raspberry Pi devices for managing
> hardware pins. The file acts as a notification channel for handling
> hardware events and interrupts. [1
> <
https://community.openhab.org/t/python3-binding-discussion/161914/143>, 2
> <
https://forum.openmarine.net/showthread.php?tid=6149&page=2>]
> When scripts utilizing high-level libraries like gpiozero crash or report
> an "Operation not permitted" or "Can't set permissions" error, it is almost
> always due to this file being generated in a directory where your program
> does not have write permissions. [1
> <
https://github.com/gpiozero/gpiozero/issues/1106>, 2
> <
https://forums.raspberrypi.com/viewtopic.php?t=379869>]
> Why the Error Happens
>
> - Systemd Services: Running your script as a boot service defaults the
> working directory to the root directory (/), where standard scripts are
> forbidden to write. [1
> <
https://github.com/gpiozero/gpiozero/discussions/1153>]
> - External Storage: Running scripts directly from a USB flash drive or
> restricted media directory often conflicts with Linux file permission
> policies. [1 <
https://forums.raspberrypi.com/viewtopic.php?t=399250>, 2
> <
https://forums.raspberrypi.com/viewtopic.php?t=379869>]
>
> How to Fix It
> You can easily resolve this issue using one of the following proven methods:
> Method 1: Change the Working Directory Environment Variable (Recommended) [1
> <
https://github.com/joan2937/lg/issues/12>]
> You can force lgpio to create its temporary notification pipes in the
> system's global temporary folder (/tmp), where all users have write
> permissions. [1 <
https://github.com/joan2937/lg/issues/22>, 2
> <
https://forum.openmarine.net/showthread.php?tid=6149&page=2>]
>
> 1. Open your terminal.
> 2. Define the global environment variable by running:
> bash
> export LG_WD=/tmp
> Use code with caution.
> 3. To make this change permanent, add export LG_WD=/tmp to your system
> profile or your shell configuration file (like ~/.bashrc). [1
> <
https://forum.openmarine.net/showthread.php?tid=6149&page=2>]
>
> Method 2: Fix the Systemd Service File
> If your script crashes specifically when executed via a systemd service,
> you must explicitly declare a writable directory. [1
> <
https://github.com/gpiozero/gpiozero/discussions/1153>]
>
> 1. Open your service configuration file (e.g.,
> /etc/systemd/system/myscript.service).
> 2. Add a WorkingDirectory parameter under the [Service] block pointing
> to a path owned by your script's user:
> ini
> [Service] WorkingDirectory=/home/your_username/
> ExecStart=/usr/bin/python3 /home/your_username/script.py
> Use code with caution.
> 3. Reload the system daemon and restart your service:
> bash
> sudo systemctl daemon-reload sudo systemctl restart myscript.service
> Use code with caution.
> [1 <
https://github.com/gpiozero/gpiozero/discussions/1153>]
>
> Method 3: Change Directory Inside the Python Script
> If you do not want to change system files, you can force the Python runtime
> to change its execution context to a writable folder before invoking any
> hardware controls. Add these lines to the absolute top of your script: [1
> <
https://github.com/gpiozero/gpiozero/discussions/1153>]
>>>> *⊣GE⊢*