openbci-archive / OpenBCI_Python

The Python software library designed to work with OpenBCI hardware.
MIT License
506 stars 207 forks source link

AttributeError: 'OpenBCICyton' object has no attribute 'log_packet_count' #123

Open LarissaBruebach opened 5 years ago

LarissaBruebach commented 5 years ago

Hello,

sometimes, when starting the streaming I encounter the following error:

Connecting to V3 at port COM3
Serial established...
Traceback (most recent call last):
  File "Start.py", line 24, in <module>
    fire.Fire(Start)
  File "C:\Users\s363541\AppData\Local\Continuum\anaconda3\envs\openBCI\lib\site-packages\fire\core.py", line 127, in Fire
    component_trace = _Fire(component, args, context, name)
  File "C:\Users\s363541\AppData\Local\Continuum\anaconda3\envs\openBCI\lib\site-packages\fire\core.py", line 366, in _Fire
    component, remaining_args)
  File "C:\Users\s363541\AppData\Local\Continuum\anaconda3\envs\openBCI\lib\site-packages\fire\core.py", line 542, in _CallCallable
    result = fn(*varargs, **kwargs)
  File "Start.py", line 16, in determineMode
    stream = Streaming.Streaming()
  File "D:\ProjektPeter\2018-avatar-desktop-autism\Code\PythonApplication\OpenBCI_Python\Streaming.py", line 20, in __init__
    self.board = bci.OpenBCICyton(port=self.port, scaled_output=False, log=True, daisy=True)
  File "D:\ProjektPeter\2018-avatar-desktop-autism\Code\PythonApplication\OpenBCI_Python\openbci\cyton.py", line 98, in __init__
    self.print_incoming_text()
  File "D:\ProjektPeter\2018-avatar-desktop-autism\Code\PythonApplication\OpenBCI_Python\openbci\cyton.py", line 364, in print_incoming_text
    self.warn("No Message")
  File "D:\ProjektPeter\2018-avatar-desktop-autism\Code\PythonApplication\OpenBCI_Python\openbci\cyton.py", line 337, in warn
    if self.log_packet_count:
AttributeError: 'OpenBCICyton' object has no attribute 'log_packet_count'

I don't know why this ist happening. It happens irregulary, but when it happens it occurs several times in a row. The only thing I think is related to it is that it seems to happen after I had to interrupt the program using Ctrl + C. The current workaround is to start the application until the error does not happen anymore.

I'm using the cyton board and the daisy module.

Can anyone fix this or tell me why this is happening? Thanks! Lara