Ramir0 / Myo4Linux

Direct bluetooth connection between Linux and Myo armband using Bluegiga BGAPI/BGLib
48 stars 28 forks source link

Python 3.8.3 throws error #10

Open lazzarello opened 3 years ago

lazzarello commented 3 years ago

Not sure why this is happening yet, though this project has low activity so I'm gonna try and fork/debug myself.

lee@henry:~/funsrc/myoarmband/Myo4Linux/lib$ python test_myo.py 
Start Myo for Linux
Find Myo device...
Finished.
Traceback (most recent call last):
  File "test_myo.py", line 30, in <module>
    main()
  File "test_myo.py", line 15, in main
    myo.connect()
  File "/home/lee/funsrc/myoarmband/Myo4Linux/lib/myo.py", line 17, in connect
    address = self.find_myo_device()
  File "/home/lee/funsrc/myoarmband/Myo4Linux/lib/myo.py", line 94, in find_myo_device
    if packet.payload.endswith(b'\x06\x42\x48\x12\x4A\x7F\x2C\x48\x47\xB9\xDE\x04\xA9\x01\x00\x06\xD5'):
TypeError: endswith first arg must be str or a tuple of str, not bytes
lazzarello commented 3 years ago

confirmed, the error is in a > python 2.7.18 syntax thing. otherwise it works great! Yea!