Hello,
I am new to using MNE-Python and will be working with bdf files. Using mne.io.read_raw_bdf(“file”) does not work and gives me the following error which I wish to fix:
runfile('/Users/mikewijnhoven/data_exploration', wdir='/Users/mikewijnhoven')
Extracting EDF parameters from /Users/mikewijnhoven/Documents/ThesisData/sub-002/ses-01/eeg/sub-002_ses-01_task-meditation_eeg.bdf...
BDF file detected
Traceback (most recent call last):
File "/Users/mikewijnhoven/data_exploration", line 15, in <module>
raw = mne.io.read_raw_bdf("/Users/mikewijnhoven/Documents/ThesisData/sub-002/ses-01/eeg/sub-002_ses-01_task-meditation_eeg.bdf")
File "/Users/mikewijnhoven/opt/anaconda3/lib/python3.8/site-packages/mne/io/edf/edf.py", line 1449, in read_raw_bdf
return RawEDF(input_fname=input_fname, eog=eog, misc=misc,
File "<decorator-gen-580>", line 24, in __init__
File "/Users/mikewijnhoven/opt/anaconda3/lib/python3.8/site-packages/mne/io/edf/edf.py", line 140, in __init__
info, edf_info, orig_units = _get_info(input_fname, stim_channel, eog,
File "/Users/mikewijnhoven/opt/anaconda3/lib/python3.8/site-packages/mne/io/edf/edf.py", line 384, in _get_info
edf_info, orig_units = _read_header(fname, exclude, infer_types)
File "/Users/mikewijnhoven/opt/anaconda3/lib/python3.8/site-packages/mne/io/edf/edf.py", line 371, in _read_header
return _read_edf_header(fname, exclude, infer_types)
File "/Users/mikewijnhoven/opt/anaconda3/lib/python3.8/site-packages/mne/io/edf/edf.py", line 632, in _read_edf_header
day, month, year = [int(x) for x in meas_date.split('.')]
File "/Users/mikewijnhoven/opt/anaconda3/lib/python3.8/site-packages/mne/io/edf/edf.py", line 632, in <listcomp>
day, month, year = [int(x) for x in meas_date.split('.')]
ValueError: invalid literal for int() with base 10: ';\n posi'
How would I fix this error? I am using macOS Monterey 12.1, Python 3.8.8., and the latest stable version of MNE.