NeuroTechX / NeuroTechX/EEG-ExPy

Problems with saving data file using brainflow

Open
#236 2 comments 0 reactions 1 assignee View on GitHub

@tmorshed is already working on this.

Since Jun 1, 2023.

brainflow bug EEG-ExPy
Dominant language
Python
Stars
575
Forks
153
Avg merge
6h 44m
Merged PRs (30d)
3

Description

Hello,

I am currently trying to record data with the Muse 2 using the SSAEP experiment and a MMN experiment. When I run them apart using brainflow everything goes fine. Now I tried running the two experiements shortly after each other which results in only one data file being saved. The other experiment runs but does not save a data file in the end and produces this error:

[2023-05-17 22:13:08.678] [board_logger] [error] failed to send command h to device
Traceback (most recent call last):
File "C:\Users\Asus\anaconda3\envs\eeg-notebooks\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "C:\Users\Asus\anaconda3\envs\eeg-notebooks\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\Asus\anaconda3\envs\eeg-notebooks\Scripts\eegnb.exe_main
.py", line 7, in
File "C:\Users\Asus\anaconda3\envs\eeg-notebooks\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Users\Asus\anaconda3\envs\eeg-notebooks\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\Asus\anaconda3\envs\eeg-notebooks\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\Asus\anaconda3\envs\eeg-notebooks\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\Asus\anaconda3\envs\eeg-notebooks\lib\site-packages\click\core.py", line 760, in invoke
return _callback(*args, **kwargs)
File "C:\Users\Asus\eeg-notebooks\eegnb\cli_main
.py", line 90, in runexp
run_experiment(experiment, eeg, recdur, outfname)
File "C:\Users\Asus\eeg-notebooks\eegnb\cli\utils.py", line 56, in run_experiment
module.present(duration=record_duration, eeg=eeg_device, save_fn=save_fn) # type: ignore
File "C:\Users\Asus\eeg-notebooks\eegnb\experiments\auditory_ssaep\ssaep_onefreq.py", line 117, in present
eeg.stop()
File "C:\Users\Asus\eeg-notebooks\eegnb\devices\eeg.py", line 429, in stop
self._stop_brainflow()
File "C:\Users\Asus\eeg-notebooks\eegnb\devices\eeg.py", line 317, in _stop_brainflow
self.board.stop_stream()
File "C:\Users\Asus\anaconda3\envs\eeg-notebooks\lib\site-packages\brainflow\board_shim.py", line 1211, in stop_stream
raise BrainFlowError('unable to stop streaming session', res)
brainflow.exit_codes.BrainFlowError: BOARD_WRITE_ERROR:4 unable to stop streaming session

If I use bluemuse everything works fine. I don´t think that it has anything to do with the order (sometimes the first experiment elicits an error and sometimes the second) or the experiment itself. Any advice how I can avoid this problem?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.