mne-bids: write_raw_bids does not produce a valid SET file

Description of the problem

The function write_raw_bids does not produce a valid .set file that can be read by EEGLAB. When importing a .set file that was generated by write_raw_bids in EEGLAB, we systematically get the following error:

Screenshot (23)

Steps to reproduce

import mne
import os
from mne_bids import write_raw_bids, BIDSPath

file = r'C:\Users\Lae\Documents\test_data\DCC0003_444597_V01_FACE.set'
bids_directory = r'C:\Users\Lae\Documents\test_data'
raw = mne.io.read_raw_eeglab(input_fname=file, preload=False, verbose=True)

os.makedirs(bids_directory + os.path.sep, exist_ok=True)
bids_directory = bids_directory + os.path.sep
bids_root = bids_directory
bids_basename = BIDSPath(subject='001', task='test', root=bids_root, acquisition='eeg', run=None)
bids_basename.update(session='V1')
write_raw_bids(raw, bids_basename, allow_preload=False, overwrite=False, verbose=True)

Expected results

A valid EEGLAB file

Actual results

File can’t be open, see above error.

Additional information

Platform: Windows-10-10.0.19041-SP0 Python: 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] Executable: C:\Users\Lae\Documents\hbcd-eeg2bids\Scripts\python.exe CPU: Intel64 Family 6 Model 142 Stepping 9, GenuineIntel: 4 cores Memory: Unavailable (requires “psutil” package) mne: 1.2.0 numpy: 1.20.3 {OpenBLAS 0.3.13.dev with 4 threads} scipy: 1.9.2 matplotlib: 3.6.1 {backend=TkAgg}

sklearn: 1.1.2 numba: 0.56.2 nibabel: Not found nilearn: Not found dipy: Not found openmeeg: Not found cupy: Not found pandas: 1.5.0 pyvista: Not found pyvistaqt: Not found ipyvtklink: Not found vtk: Not found qtpy: Not found ipympl: Not found pyqtgraph: Not found pooch: v1.6.0

mne_bids: 0.12 mne_nirs: Not found mne_features: 0.2.1 mne_qt_browser: Not found mne_connectivity: Not found mne_icalabel: Not found

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 20 (19 by maintainers)

Most upvoted comments

Sure 😃

it’s likely a bug in https://github.com/jackz314/eeglabio

can you open an issue there?

Message ID: @.***>