It's better, but now i get this error:You probably want to set WorkingDirectory to a directory where user pi has write rights and use the full path to the python of your venv.
For my blink.py in a venv in my_project, the service file hasIt is on a Pi5 runing Bookworm 64-bitCode:
... WorkingDirectory=/home/pi/my_project ExecStart=/home/pi/my_project/env/bin/python /home/pi/my_project/blink.py
Code:
juin 10 10:25:20 raspberrypi MasterVPN.sh[2281]: File "/home/pi/Desktop/ManageVPN/Blink.py", line 4, in <module>juin 10 10:25:20 raspberrypi MasterVPN.sh[2281]: import RPi.GPIO as GPIOjuin 10 10:25:20 raspberrypi MasterVPN.sh[2281]: ModuleNotFoundError: No module named 'RPi'
Statistics: Posted by lebossejames — Mon Jun 10, 2024 8:28 am