You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the Mindset headset with the RF dongle.
I've tested with various scripts including the code snipped from your example.
The headset connects but just after that it receives the following error:
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
self.run()
File "F:\code\EEG_Python_learning\mindwave.py", line 73, in run
self.parse_payload(payload)
File "F:\code\EEG_Python_learning\mindwave.py", line 143, in parse_payload
raw=ord(value[0])*256+ord(value[1])
IndexError: string index out of range
I can't seem to figure out what the correct value should be and why I'm getting this error.
This happens all the time
The text was updated successfully, but these errors were encountered:
I were able to "fix" it for now.
I wrapped the code in the parse_payload() method in a try catch. It seems to have worked.
if code == RAW_VALUE:
try:
raw=ord(value[0])*256+ord(value[1])
if (raw>=32768):
raw=raw-65536
self.headset.raw_value = raw
for handler in self.headset.raw_value_handlers:
handler(self.headset, self.headset.raw_value)
except IndexError:
continue
I have the Mindset headset with the RF dongle.
I've tested with various scripts including the code snipped from your example.
The headset connects but just after that it receives the following error:
I can't seem to figure out what the correct value should be and why I'm getting this error.
This happens all the time
The text was updated successfully, but these errors were encountered: