Betree / magicblue

💡 Unofficial Python API to control Magic Blue bulbs over Bluetooth
MIT License
100 stars 23 forks source link

UnboundLocalError: local variable 'addr_type' referenced before assignment #21

Closed SeNike closed 7 years ago

SeNike commented 7 years ago

Hi Betree,

I'm having some problems connecting to my bulbs (V8)

pi@raspberrypi:~ $ sudo magicblueshell -c 'set_color red' -m e7:34:44:5d:f7:f3 Traceback (most recent call last): File "/usr/local/bin/magicblueshell", line 9, in load_entry_point('magicblue==0.3.0', 'console_scripts', 'magicblueshell')() File "/usr/local/lib/python3.4/dist-packages/magicblue/magicblueshell.py", line 271, in main shell.cmd_connect([params.mac_address]) File "/usr/local/lib/python3.4/dist-packages/magicblue/magicblueshell.py", line 144, in cmd_connect addr_type=addr_type) UnboundLocalError: local variable 'addr_type' referenced before assignment

Betree commented 7 years ago

Thanks for the bug report, I'll publish a fix in the next hours

Betree commented 7 years ago

Please try again, it should work now

SeNike commented 7 years ago

Now it work great. Thank you!