Description of the problem
In uncommon (usually stemming from custom code) cases where EEG.data is a string but does not point to the FDT file, this error prevents the user from loading the data:
|
raise OSError("Expected .fdt file format. Found %s format" % fmt) |
Since the following lines deal with the case of data_fname not being found, I suggest converting this error to a warning. EEGLAB also has a similar behavior, which falls back to searching the directory for the FDT file if the EEG.data string does not point to the FDT.
Steps to reproduce
datafile = './sub-002_task-FacePerception_run-1_eeg_ON.set'
EEG = mne.io.read_raw_eeglab(datafile, preload=True)
Link to data
https://drive.google.com/drive/folders/18y0TALqwT4Z2yg4T6QafDAqIrY04jI5k?usp=sharing
Expected results
EEG will point to the data object.
Actual results
OSError: Expected .fdt file format. Found format
Additional information
Platform macOS-14.4-arm64-arm-64bit
Python 3.10.13 (main, Sep 11 2023, 08:24:56) [Clang 14.0.6 ]
Executable [/opt/homebrew/anaconda3/envs/torch-sci/bin/python](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/anaconda3/envs/torch-sci/bin/python)
CPU arm (8 cores)
Memory 16.0 GB
Core
├☑ mne 1.6.1 (latest release)
├☑ numpy 1.26.3 (OpenBLAS 0.3.21 with 8 threads)
├☑ scipy 1.11.4
Description of the problem
In uncommon (usually stemming from custom code) cases where
EEG.datais a string but does not point to the FDT file, this error prevents the user from loading the data:mne-python/mne/io/eeglab/eeglab.py
Line 56 in 14ff948
Since the following lines deal with the case of
data_fnamenot being found, I suggest converting this error to a warning. EEGLAB also has a similar behavior, which falls back to searching the directory for the FDT file if theEEG.datastring does not point to the FDT.Steps to reproduce
Link to data
https://drive.google.com/drive/folders/18y0TALqwT4Z2yg4T6QafDAqIrY04jI5k?usp=sharing
Expected results
EEG will point to the data object.
Actual results
OSError: Expected .fdt file format. Found format
Additional information