PermissionError: Permission denied

I have a python program that imports gopygo.
If I run the program under my user it works fine.
I need to invoke it from shairport-sync service. when I do that I get the following error:
Jul 27 19:35:56 raspberrypi shairport-sync[489]: Traceback (most recent call last):
Jul 27 19:35:56 raspberrypi shairport-sync[489]: File “/home/pi/Watson/mprobot.py”, line 10, in
Jul 27 19:35:56 raspberrypi shairport-sync[489]: from gopigo import *
Jul 27 19:35:56 raspberrypi shairport-sync[489]: File “/home/pi/Watson/gopigo.py”, line 60, in
Jul 27 19:35:56 raspberrypi shairport-sync[489]: bus = smbus.SMBus(1)
Jul 27 19:35:56 raspberrypi shairport-sync[489]: PermissionError: [Errno 13] Permission denied

How do i give the shairport-sync service permission? Or is there another solution?

1 Like

Don’t forget to also send your question to the official support@modrobotics.com

1 Like