Closed BobbyM5 closed 3 years ago
This has been linked to a problem with an older (i.e., earlier than 3.6) version of Python on the machine. More details are available in the UDI forum. Use of the choices object in the standard random Python library was added to the nodeserver in 2.1.13 to get around some MyQ API changes, but requires Python 3.6 or better. Python 3.6 is the oldest version (other than 2.7) still supported by Python Software Foundation. I am going to bet you are running this in a non-traditional environment, like a docker instance on a PC built from an image obtained from the Internet that has an old version of Python installed.
You can try to update the version of Python in your environment to 3.6 or better (I recommend 3.8). Alternatively, you can try running the nodeserver on Polisy or in the cloud on PGC.
This has been linked to a problem with an older (i.e., earlier than 3.6) version of Python on the machine. More details are available in the UDI forum. Use of the choices object in the standard random Python library was added to the nodeserver in 2.1.13 to get around some MyQ API changes, but requires Python 3.6 or better. Python 3.6 is the oldest version (other than 2.7) still supported by Python Software Foundation. I am going to bet you are running this in a non-traditional environment, like a docker instance on a PC built from an image obtained from the Internet that has an old version of Python installed.
You can try to update the version of Python in your environment to 3.6 or better (I recommend 3.8). Alternatively, you can try running the nodeserver on Polisy or in the cloud on PGC.
This fixed it, Thank you!
This has worked for a long time but just stopped a month or 2 ago. I am just now getting around to looking at it. Any ideas on what i should do to fix it? Thank you for any help, Bob.
Version 2.2.9 Status: Connected Frontend Version: 2.2.9-1 ISY Version: 5.0.16C Uptime: 24 Minute(s) 15 Second(s)
MyQ(2) Current Status: Disconnected Current Version: 2.1.14 Time Started: Not Running Uptime: None
2021-02-03 15:58:02,893 MainThread polyinterface INFO polylogger:set_basic_config: set_basic_config: enable=True level=30 2021-02-03 15:58:03,348 MainThread polyinterface INFO polyinterface:init_interface: Received Config from STDIN. 2021-02-03 15:58:03,349 MainThread polyinterface INFO init:: UDI Polyglot v2 Interface 2.1.0 Starting...
2021-02-03 15:58:03,687 MainThread polyinterface ERROR polyinterface:write: Traceback (most recent call last):
2021-02-03 15:58:03,688 MainThread polyinterface ERROR polyinterface:write: File "./myq-poly.py", line 16, in
2021-02-03 15:58:03,688 MainThread polyinterface ERROR polyinterface:write: from myqapi import MyQ, API_DEVICE_TYPE_GATEWAY, API_DEVICE_TYPE_OPENER, API_DEVICE_TYPE_LAMP, API_DEVICE_STATE_OPEN, API_DEVICE_STATE_CLOSED, API_DEVICE_STATE_STOPPED, API_DEVICE_STATE_OPENING, API_DEVICE_STATE_CLOSING, API_DEVICE_STATE_ON, API_DEVICE_STATE_OFF, API_LOGIN_BAD_AUTHENTICATION, API_LOGIN_ERROR, API_LOGIN_SUCCESS
2021-02-03 15:58:03,689 MainThread polyinterface ERROR polyinterface:write: File "/home/pi/.polyglot/nodeservers/MyQ/myqapi.py", line 12, in
2021-02-03 15:58:03,689 MainThread polyinterface ERROR polyinterface:write: from random import choices
2021-02-03 15:58:03,690 MainThread polyinterface ERROR polyinterface:write: ImportError
2021-02-03 15:58:03,690 MainThread polyinterface ERROR polyinterface:write: :
2021-02-03 15:58:03,690 MainThread polyinterface ERROR polyinterface:write: cannot import name 'choices'