praschak / candelapy

Python Script to control Yeelight Candela Ambient Lamp YLFW01YL over BLE
18 stars 2 forks source link

AttributeError: 'NoneType' object has no attribute 'is_set' #3

Closed Ener-G closed 5 years ago

Ener-G commented 5 years ago

Hallo,

i got this error message and no control over the lamp:

 python /home/pi/candelapy/candelapy.py <MAC> 100
WARNING: No module named pexpect
Traceback (most recent call last):
  File "/home/pi/candelapy/candelapy.py", line 31, in <module>
    adapter.stop()
  File "/usr/local/lib/python2.7/dist-packages/pygatt/backends/gatttool/gatttool.py", line 281, in stop
    self.disconnect(self._connected_device)
  File "/usr/local/lib/python2.7/dist-packages/pygatt/backends/gatttool/gatttool.py", line 53, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pygatt/backends/gatttool/gatttool.py", line 419, in disconnect
    if not self._receiver.is_set("disconnected"):
AttributeError: 'NoneType' object has no attribute 'is_set'
Ener-G commented 5 years ago

My mistake... after the integration of "pexpect" it works fine.