SuperBruceJia / EEG-Motor-Imagery-Classification-CNNs-TensorFlow

EEG Motor Imagery Tasks Classification (by Channels) via Convolutional Neural Networks (CNNs) based on TensorFlow
https://iopscience.iop.org/article/10.1088/1741-2552/ab4af6/meta
200 stars 46 forks source link

ERROR: Read_Raw_Data_Save_Into_Matlab_Files.py #8

Open chiachi926 opened 12 months ago

chiachi926 commented 12 months ago

Hello, I'm running the code "Read_Raw_Data_Save_Into_Matlab_Files.py" under the environment with python version= 2.7.18, but I always get an error shows below, is there anything wrong? Thanks!

Traceback (most recent call last): File "Read_Raw_Data_Save_Into_Matlab_Files.py", line 209, in X_105_C5, y_105_C5 = load_raw_data(electrodes=electrodes, subject=subject, num_classes=nclasses) File "Read_Raw_Data_Save_Into_Matlab_Files.py", line 200, in load_raw_data return np.array(trials, dtype=np.float64).reshape((len(trials),) + trials[0].shape + (1,)), np.array(labels, dtype=np.float64) IndexError: list index out of range

imshenwei commented 11 months ago

same error on this , which #5 ones comment mentioned

going to try either lower version of python (2.7.*) or digging into code error

conda install -c conda-forge {python-package} python==2.7.18 certifi 2019.11.28 numpy 1.16.6 pandas 0.24.2 pip 19.3.1 pyEDFlib 0.1.17 python-dateutil 2.8.2 pytz 2023.3.post1
scipy 1.2.1 setuptools 44.0.0.post20200106 six 1.16.0 wheel 0.37.1 wincertstore 0.2

SuperBruceJia commented 11 months ago

imshenwei @chiachi926 @imshenwei

Dear Chia-Chi and Wei, I am so sorry for the late reply! I didn't see the GitHub messages last month!

To solve this issue, first of all, please double-check your Python Environment. Python 2.7 Environment is required. Besides, please install 0.1.11 version of pyEDFlib. The installation instruction is as follows:

$ pip install pyEDFlib==0.1.11

Please also check my EEG-DL library for more model support and bug fixes.

If you guys have any further questions or problems, please don't hesitate to let me know!

Best regards,

Shuyue Nov 22, 2023

ajaireshman267 commented 7 months ago

Dear @SuperBruceJia i have tried both your suggestion and wei suggestion but still this error persists i will mention the error below , please help me Start to save the File! Traceback (most recent call last): File "Read_Raw_Data_Save_Into_Matlab_Files.py", line 209, in X_105_C5, y_105_C5 = load_raw_data(electrodes=electrodes, subject=subject, num_classes=nclasses) File "Read_Raw_Data_Save_Into_Matlab_Files.py", line 200, in load_raw_data return np.array(trials, dtype=np.float64).reshape((len(trials),) + trials[0].shape + (1,)), np.array(labels, dtype=np.float64) IndexError: list index out of range