Open arjbingly opened 3 weeks ago
Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴
I have noticed the same problem (IndexError: index -1 is out of bounds for axis 0 with size 0
) while trying to load this dataset: https://figshare.com/articles/dataset/The_original_EEG_data_for_driver_fatigue_detection/5202739.
I tested different versions of MNE and discovered that the last version where the .cnt file loading works is 1.6.1. With 1.7.0 it breaks.
Hi, I also meet this problem in issue #12982 and submit a PR #12986 to quick fix for this issue.
Please wait for the futher review.
If you are hurry, you may try to change the code in MNE source code: if annotations.onset[-1] * sfreq > n_samples
to if annotations and annotations.onset[-1] * sfreq > n_samples
If it also wrok on your case, you may close this issue and waiting for PR merges. Thank you.
Description of the problem
I'm encountering an
IndexError
when attempting to load Neuroscan .cnt files withmne.io.read_raw_cnt()
in MNE-Python version 1.8.0. This issue does not occur in version 1.3.0, suggesting a potential regression.Additional Observations:
preload=False
, the error occurs upon callingraw.load_data()
.mne.io.read_raw_cnt(file_path, preload=True)
(hereby referred to as Code1), aRuntimeWarning: Could not define the number of bytes automatically. Defaulting to 2.
. The default option seems to be right for the file.data_format='int16'
(hereby referred to as Code2), aValueError: cannot reshape array of size 5330556 into shape (781250,64,1)
is produced.preload=False
, loading small portions of the data (raw.get_data(start=0, stop=100)
) does not produce an error.Steps Taken:
Steps to reproduce
Link to data
Unfortunately, I am not allowed to share the data.
Expected results
Execute without errors.
Actual results
The error produced with Code1
The error produced with Code2
Additional information