TypeError: unsupported operand type(s) for +: 'BleakGATTCharacteristicBlueZDBus' and 'int'
GabrieleFerrero opened this issue · comments
Hi, I tried to install muselsl library but when I try to run a stream it gives me this error:
Connecting to Muse: 00:55:DA:B9:67:2E...
Connected.
Streaming EEG...
ERROR:root:A message handler raised an exception: unsupported operand type(s) for +: 'BleakGATTCharacteristicBlueZDBus' and 'int'.
Traceback (most recent call last):
File "/home/gabriele/Applicazioni/anaconda3/envs/prova/lib/python3.7/site-packages/dbus_fast/message_bus.py", line 778, in _process_message
result = user_handler(msg)
File "/home/gabriele/Applicazioni/anaconda3/envs/prova/lib/python3.7/site-packages/bleak/backends/bluezdbus/manager.py", line 832, in _parse_msg
on_value_changed(message.path, self_interface["Value"])
File "/home/gabriele/Applicazioni/anaconda3/envs/prova/lib/python3.7/site-packages/bleak/backends/bluezdbus/client.py", line 152, in on_value_changed
callback(bytearray(value))
File "/home/gabriele/Applicazioni/anaconda3/envs/prova/lib/python3.7/site-packages/muselsl/backends.py", line 63, in wrap
value_handle = declaration_handle + 1
TypeError: unsupported operand type(s) for +: 'BleakGATTCharacteristicBlueZDBus' and 'int'
My guess is that this will be solved by this PR: #187
I am having the same issue listed in this issue. @jdpigeon is any additional support needed to get the PR pass builds? I only ask because I need the fix for a time sensitive project and would love to help contribute if there is something I can do to make the release easier. Let me know!
If the pr is in question, a version specifier of 'bleak<0.18.0
might be appropriate in setup.py .
I've tried a lot of python code including the code found here, like neurofeedback.py, startMuseStream.py, recordStream.py and muselsl view. I'm using an ubuntu installation, 22.04. I've also tried some on a Mac M1 laptop. Some successes, but mostly failures. I also switch bluetooth on and off. Bleak is set to 0.17.0.
- I'm using Muse 2, the first version
- pylsl does not seem to work.
- muselsl and muselsl view seem to work for startMuseStream.py, not recordStream.py
- utils.py is installed
- neurofeedback.py does not work. it can't find EEG stream.
- Typical errors are "IndexError: list index out of range" or can't find EEG stream. The Bleak and int errors are gone.
Any ideas for whats wrong here. Some other packages that have a version number that does not work?
piplist.txt
UPDATE:
When I ran python startMuseStream.py first, everything worked, thus no problems. These were the commands that worked provided Bleak==0.17.0:
- muselsl view
- python neurofeedback.py
- python recordStream.py
- pylsl
@fullflyt I recommend opening a new issue and including very clear logs of output and commands run, as well as links to anything involved outside this repository.
It can take a long time to get a response in this repo.
#187 has been merged and the package has been pushed to pypi. Thanks for all the help, everybody, and I'm sorry we weren't able to get this fixed sooner, @davidbichara