I have a Python program using lgpio.py
that runs as it should from the command line but fails when loaded as a service. I get the following error:
Loaded: loaded (/etc/systemd/system/meye.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Sat 2024-05-11 10:36:09 EDT; 18min ago
Duration: 215ms
Main PID: 1921 (code=exited, status=1/FAILURE)
CPU: 215ms
May 11 10:36:09 meye python3[1921]: import lgpio
May 11 10:36:09 meye python3[1921]: File "/home/prw/meyeve/lib/python3.11/site-packages/lgpio.py", line 562, in <module>
May 11 10:36:09 meye python3[1921]: _notify_thread = _callback_thread()
May 11 10:36:09 meye python3[1921]: ^^^^^^^^^^^^^^^^^^
May 11 10:36:09 meye python3[1921]: File "/home/prw/meyeve/lib/python3.11/site-packages/lgpio.py", line 504, in __init__
May 11 10:36:09 meye python3[1921]: self._file = open('.lgd-nfy{}'.format(self._notify), 'rb')
May 11 10:36:09 meye python3[1921]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
May 11 10:36:09 meye python3[1921]: FileNotFoundError: [Errno 2] No such file or directory: '.lgd-nfy-3'
May 11 10:36:09 meye systemd[1]: meye.service: Main process exited, code=exited, status=1/FAILURE
May 11 10:36:09 meye systemd[1]: meye.service: Failed with result 'exit-code'.
The unit file is:
Description=minds_eye
[Service]
User=prw
ExecStart=/home/prw/meyeve/bin/python3 /home/prw/Documents/MindsEye_V1.0.py
[Install]
WantedBy=multi-user.target
I have no idea why I’m getting the error. Can anyone suggest what the issue might be? Thanks.