Platform Pi 3B+ (stretch and buster)
I have a piece of Python3 code that uses the serial library.
I imported this library with sudo apt-get install python3-serial
the code is placed in .../domoticz/scripts/python/script_time_test.py to activate it every minute bij de Domoticz scheduler.
The code contains at this moment only import commands
Code: Select all
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import datetime
import json
import os.path
import shutil
import threading
import time
import serial
However if the Domotics sceduler starts the scripts, all standard libraries that come with the raspbian distribution are imported without problems but the serial library ends up with the error
How is domoticz starting the scripts in the .../scripts/python directory?2019-10-29 09:37:00.162 Error: EventSystem: Failed to execute python event script "/home/pi/domoticz/scripts/python/script_time_VirtDev.py"
2019-10-29 09:37:00.162 Error: EventSystem: Traceback (most recent call last):
2019-10-29 09:37:00.162 Error: EventSystem: File "/home/pi/domoticz/scripts/python/script_time_VirtDev.py", line 10, in <module>
2019-10-29 09:37:00.162 Error: EventSystem: import serial
2019-10-29 09:37:00.162 Error: EventSystem: ImportError: No module named 'serial'
Does domoticz honour my choice of python interpreter specified in the script, or does it impose its own choice of interpreter?