ninnghazad / roccat_kone_aimo

A few bits of code to set RGB leds on a Rocca Kone Aimo mouse.
The Unlicense
8 stars 3 forks source link

Use binascii.unhexlify instead of str.decode #1

Closed an0nfunc closed 4 years ago

an0nfunc commented 4 years ago

Hey!

Thanks for bringing some much needed love to the Roccat AIMO, hope we'll get this train rolling :)

For Python 3.8 I needed to change str.decode('hex') to binascii.unhexlify("<hex here>"), since you can only decode bytes now iirc. binascii.unhexlify is part of binascii, which should be available for your python version as well.

Traceback (most recent call last):
  File "/usr/local/bin/aimo.py", line 117, in <module>
    init()
  File "/usr/local/bin/aimo.py", line 110, in init
    data = "0E06010100FF".decode("hex")
AttributeError: 'str' object has no attribute 'decode'
ninnghazad commented 4 years ago

Changed, close if it's fixed for you.

an0nfunc commented 4 years ago

LGTM, thanks!