-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues (different) on both PY2.7 and PY3.5 #17
Comments
Found the issue. There were some changes made to "construct" as described here: construct/construct#642 Overwriting the constructs directory with the contents from an older version 2.9.25 (available here https://github.com/construct/construct/releases/tag/v2.9.25 ) solved the issue on Python3.5, it now works! I suspect that some changes will need to be made to yeelightbt to keep it compatible going forward. Thanks |
The construct's API is currently unstable, but this issue will probably be fixed by PR #16. Btw, you should use pip to install the packages instead of manually copying files over, so |
python-yeelightbt requires Python '>=3.4' but the running Python is 2.7.13 not work install |
Construct has achieved what you would call a "stable API". Well, almost stable: the issue described in the PR (EmbeddedSwitch) remains unresolved. But otherwise, its stable. :) |
👍 I will close this issue, this project does not support python 2, and the symmetricmapping problem is tracked in #18. |
Install seems successful but error as follows installed on Python2.7.9:
@raspberrypi:~ export YEELIGHTBT_MAC=F8:24:41:C0:36:AF
@raspberrypi:~ yeelightbt
Traceback (most recent call last):
File "/usr/local/bin/yeelightbt", line 11, in
load_entry_point('python-yeelightbt==0.0.3.1', 'console_scripts', 'yeelightbt')()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 561, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2631, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2291, in load
return self.resolve()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2297, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/local/lib/python2.7/dist-packages/yeelightbt/init.py", line 2, in
from .lamp import Lamp
File "/usr/local/lib/python2.7/dist-packages/yeelightbt/lamp.py", line 192
def set_temperature(self, kelvin: int, brightness: int):
^
SyntaxError: invalid syntax (caret is under the : after Kelvin)
And on PY3.5:
@raspberrypi:~ export YEELIGHTBT_MAC=F8:24:41:C0:36:AF
@raspberrypi:~ yeelightbt --help
Traceback (most recent call last):
File "/usr/local/bin/yeelightbt", line 11, in
load_entry_point('python-yeelightbt==0.0.3.1', 'console_scripts', 'yeelightbt')()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 561, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2631, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2291, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2297, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/local/lib/python3.5/dist-packages/yeelightbt/init.py", line 2, in
from .lamp import Lamp
File "/usr/local/lib/python3.5/dist-packages/yeelightbt/lamp.py", line 7, in
from .structures import Request, Response, StateResult
File "/usr/local/lib/python3.5/dist-packages/yeelightbt/structures.py", line 4, in
from construct import (Struct, Int8ub, Int16ub, Const, Padded, Byte, Enum, Bytes, If, FlagsEnum,
ImportError: cannot import name 'SymmetricMapping'
Thank you!!
The text was updated successfully, but these errors were encountered: