script: python import error - UPDATE [solved]

Easy to use, 100% Lua-based event scripting framework.
Post Reply
lupo2a
Posts: 52
Joined: Thursday 29 September 2016 10:55
Target OS: Raspberry Pi
Domoticz version:
Contact:

script: python import error - UPDATE [solved]

Post by lupo2a » Tuesday 13 March 2018 10:45

I installed from scratch a with noobs raspbian environment and domoticz 3.8984

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 &')
When the script runs In the test_err.txt there is the following error

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
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
Raspberry PI 3 raspbian stretch
Domoticz: V3.9047
- Aeotec Gen5 EU
- Neo CoolCam Door Detector and plug
- FIBARO FGWPE Wall Plug
- 6 FIBARO System FGRM222 Roller Shutter Controller 2
- Kodi SamnsungTV Yamaha plugin

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests