Hi,
I recently started using the mne toolbox for the preprocessing of my Eyelink pupil data and for most files this works fantastically, but I have a few files where the read_raw_eyelink function gives me the following error:
Traceback (most recent call last):
File "/home/msteijg/Desktop/topstore/2024_vanGaal_FMG-7251_NeuralArousal/Scripts/Scripts_eyetracker/0_preprocess_pupil_block.py", line 260, in <module>
res = Parallel(n_jobs=n_jobs, verbose=1, backend='loky')(delayed(load_data)(filename, figs_dir) for filename in tqdm(asc_filenames))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/msteijg/pip3_analysis/lib/python3.12/site-packages/joblib/parallel.py", line 1918, in __call__
return output if self.return_generator else list(output)
^^^^^^^^^^^^
File "/home/msteijg/pip3_analysis/lib/python3.12/site-packages/joblib/parallel.py", line 1847, in _get_sequential_output
res = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/msteijg/Desktop/topstore/2024_vanGaal_FMG-7251_NeuralArousal/Scripts/Scripts_eyetracker/0_preprocess_pupil_block.py", line 82, in load_data
raw_et = mne.io.read_raw_eyelink(filename, verbose="CRITICAL")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/msteijg/pip3_analysis/lib/python3.12/site-packages/mne/io/eyelink/eyelink.py", line 59, in read_raw_eyelink
raw_eyelink = RawEyelink(
^^^^^^^^^^^
File "<decorator-gen-204>", line 10, in __init__
File "/home/msteijg/pip3_analysis/lib/python3.12/site-packages/mne/io/eyelink/eyelink.py", line 127, in __init__
self.set_annotations(gap_annots + eye_annots)
File "<decorator-gen-189>", line 12, in set_annotations
File "/home/msteijg/pip3_analysis/lib/python3.12/site-packages/mne/io/base.py", line 747, in set_annotations
new_annotations._prune_ch_names(self.info, on_missing)
File "/home/msteijg/pip3_analysis/lib/python3.12/site-packages/mne/annotations.py", line 498, in _prune_ch_names
_on_missing(
File "/home/msteijg/pip3_analysis/lib/python3.12/site-packages/mne/utils/check.py", line 1218, in _on_missing
raise error_klass(msg)
ValueError: At least one channel name in annotations missing from info: xpos_left
I checked the asc file that I feed to the function, but the data there looks fine. I think mne doesn’t recognize the channel names, but I can’t find where it gets it from, as xpos_left is also not present in the asc file that does run normally.
I also tried to find other people with this problem, but I couldn’t find anyone with this error while loading pupil data, rather than EEG for example.
Anyone know how I can check if this channel is actually missing or if it isn’t read out properly?
Many thanks!!
The relevant code I use is
# Convert edf to asc file
os.system('edf2asc {}'.format(edf_filename))
# Load asc as raw object
raw_et = mne.io.read_raw_eyelink(asc_filename)
- MNE version 1.9.0
- operating system: Linux
- Python version 3.12.3