Openbci-streamer AttributeError: 'CytonRFDuino' object has no attribute 'daisy'
I installed openbci-streamer using the git repository on python 3.8 and runned this code:
import time
from openbci_stream.acquisition import OpenBCIConsumer
with OpenBCIConsumer(mode='serial', endpoint='/dev/ttyUSB0', streaming_package_size=250) as (stream, openbci):
t0 = time.time()
for i, message in enumerate(stream):
if message.topic == 'eeg':
print(f"{i}: received {message.value['samples']} samples")
t0 = time.time()
if i == 9:
break
It is an example of: https://openbci-stream.readthedocs.io/en/latest/
I received this error:
`WARNING:OpenBCI-Stream:'pyedflib' is needed for export to EDF
WARNING:OpenBCI-Stream:No module named 'pyedflib'
Traceback (most recent call last):
File "/home/sjoerd/Documents/BCI_online_teleoperation/OpenBCI stream/OpenBCI-Streamer.py", line 4, in <module>
with OpenBCIConsumer(mode='serial', endpoint='/dev/ttyUSB0', streaming_package_size=250) as (stream, openbci):
File "/home/sjoerd/anaconda3/envs/openbci-env/lib/python3.8/site-packages/openbci_stream/acquisition/consumer.py", line 92, in __init__
self.openbci = Cyton(mode=mode,
File "/home/sjoerd/anaconda3/envs/openbci-env/lib/python3.8/site-packages/openbci_stream/acquisition/cyton.py", line 835, in __init__
openbci.append(CytonRFDuino(end, host, daisy[board_id], mtg,
File "/home/sjoerd/anaconda3/envs/openbci-env/lib/python3.8/site-packages/openbci_stream/acquisition/cyton.py", line 247, in __init__
super().__init__(daisy, montage, streaming_package_size,
File "/home/sjoerd/anaconda3/envs/openbci-env/lib/python3.8/site-packages/openbci_stream/acquisition/cyton_base.py", line 210, in __init__
self.montage = montage
File "/home/sjoerd/anaconda3/envs/openbci-env/lib/python3.8/site-packages/openbci_stream/acquisition/cyton_base.py", line 254, in montage
if self.daisy:
File "/home/sjoerd/anaconda3/envs/openbci-env/lib/python3.8/site-packages/openbci_stream/acquisition/cyton_base.py", line 815, in __getattribute__
return super().__getattribute__(attr)
AttributeError: 'CytonRFDuino' object has no attribute 'daisy'`
Anybody know how to fix it?
Comments
That package is not supported by OpenBCI. We suggest you use Brainflow instead:
https://brainflow.org/ [join the Slack with the link on that page]
https://brainflow.readthedocs.io/en/stable/Examples.html#python
Thanks @wjcroft I will try that