script: python import error - UPDATE [solved]
Posted: Tuesday 13 March 2018 9:45
I installed from scratch a with noobs raspbian environment and domoticz 3.8984
in a dzVents script I have the followig line
When the script runs In the test_err.txt there is the following error
If I log in with usr pi and run the same command line it works.
Any help?
UPDATE 20180314
It look like the item is related to the fact that, despite the definition of USERNAME=pi in domoticz.sh, the domoticz process is owned by root
I installed the rxv module as root and it works
in a dzVents script I have the followig line
Code: Select all
suona=os.execute('/usr/bin/python /home/pi/scripts/play_song.py -20 /home/pi/Music/Gabbani_Occidentali.mp3 /home/pi/scripts/log/test.txt 0 >/home/pi/scripts/log/test_err.txt 2>&1 &')
Code: Select all
Traceback (most recent call last):
File "/home/pi/scripts/play_song.py", line 3, in <module>
import rxv
ImportError: No module named rxv
Any help?
UPDATE 20180314
It look like the item is related to the fact that, despite the definition of USERNAME=pi in domoticz.sh, the domoticz process is owned by root
I installed the rxv module as root and it works