sde1000 / python-dali

Library for controlling DALI lighting systems
Other
150 stars 73 forks source link

dali.driver.tridonic.AsyncTridonicDALIUSBDriver Python 3 compatibility #49

Closed jjonek closed 5 years ago

jjonek commented 5 years ago

Not entirely sure but I believe this is due to something changed in Python 3:

  File "/home/.../python-dali/dali/driver/tridonic.py", line 258, in send
    sn = struct.unpack('B', data[1])[0]
TypeError: a bytes-like object is required, not 'int'

i.e. using subscription notation on struct.Struct seems to return the byte value as int