Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Connect to MindWave Mobile (Mac OS 13.0 Python 3.11.1) #12

Open
Pizzanomicon opened this issue May 19, 2023 · 0 comments
Open

Cannot Connect to MindWave Mobile (Mac OS 13.0 Python 3.11.1) #12

Pizzanomicon opened this issue May 19, 2023 · 0 comments

Comments

@Pizzanomicon
Copy link

Hi, I'm having some difficulty connecting to my MindWave Mobile- just blew the dust off of it, and am hoping it's not so far in the past it's unuseable.

Running:

import mindwave
headset = mindwave.Headset("/dev/tty.MindWaveMobile", '3A8B')

Yields:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/Users/pizzmancer/miniconda3/envs/mindwaveproject/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
>>>     self.run()
  File "/Users/pizzmancer/_Code/python-mindwave/mindwave.py", line 122, in run
    s.write(DISCONNECT)
  File "/Users/pizzmancer/miniconda3/envs/mindwaveproject/lib/python3.11/site-packages/serial/serialposix.py", line 616, in write
    d = to_bytes(data)
        ^^^^^^^^^^^^^^
  File "/Users/pizzmancer/miniconda3/envs/mindwaveproject/lib/python3.11/site-packages/serial/serialutil.py", line 65, in to_bytes
    raise TypeError('unicode strings are not supported, please encode to bytes: {!r}'.format(seq))
TypeError: unicode strings are not supported, please encode to bytes: 'Á'

I understand there is a difference between having
pip install serial
and
pip install pyserial
but neither library seems resolve this issue. Any help would be much appreciated!

(The NeuroSky drivers have been installed on my Mac, if that's a concern)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant