Import requests in scripts

Python and python framework

Moderator: leecollings

Post Reply
fickert
Posts: 4
Joined: Friday 18 November 2016 16:35
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: NL
Contact:

Import requests in scripts

Post by fickert »

I would like to execute a python script from the scripts folder. Named the file like script_device_doorbell.py and it worked. The script wrote a note in de log.

But when I tried using an import, is doesn’t work anymore. Were can I import python functions to use with a python device script?
Clem
Posts: 4
Joined: Thursday 15 March 2018 10:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Import requests in scripts

Post by Clem »

Hi @fickert,
Are you sure the library you want to import is already installed on your python system?

If so, maybe you are not using the same python version on your system and on Domoticz.
Check the python version in Domoticz log and on your system with `--version` command.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest