I'm trying to create an plugin for IKEA Trådfri and found a 3:e party python module that can talk to this device.
The problem that I'm having is that I get an error when I try to use this module in my plugin. The weird part is that it works in the Scripting Shell.
Here is the code
- Code: Select all
import sys
sys.path.append(/'3:e party module path/')
import pytradfri
api = pytradfri.coap_cli.api_factory('IP', Secret Key')
But when I try to use it in an plug in I get this error:
- Code: Select all
Indigo Tradfri Error Error in plugin execution InitializeMain:
Traceback (most recent call last):
File "plugin.py", line 12, in <module>
File "/Users/jacob/Dev/Indigo/Plug-ins/indigo-tradfri/pytradfri/coap_cli.py", line 110, in api_factory
File "/Users/jacob/Dev/Indigo/Plug-ins/indigo-tradfri/pytradfri/coap_cli.py", line 61, in request
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1334, in _execute_child
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 1382, in loads
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 858, in load
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 966, in load_string
ValueError: insecure string pickle