[英],getting error reading .set file while using MNE python package for EEG signal processing
import os
import numpy as np
import mne
data_folder = '/Users/sheetal/Desktop/emotions'
data_raw_file = os.path.join(data_folder,"sub-01","eeg","sub-01_task-ImaginedEmotion_eeg.set")
raw = mne.io.read_raw_eeglab(data_raw_file)
OUTPUT
runfile('/Users/sheetal/Desktop/emotions/sub-01/eeg/code1.py', wdir='/Users/sheetal/Desktop/emotions/sub-01/eeg')
Traceback (most recent call last):
File "/Users/sheetal/Desktop/emotions/sub-01/eeg/code1.py", line 15, in <module>
raw = mne.io.read_raw_eeglab(data_raw_file)
File "/Users/sheetal/opt/anaconda3/lib/python3.8/site-packages/mne/io/eeglab/eeglab.py", line 219, in read_raw_eeglab
return RawEEGLAB(input_fname=input_fname, preload=preload,
File "<decorator-gen-222>", line 24, in __init__
File "/Users/sheetal/opt/anaconda3/lib/python3.8/site-packages/mne/io/eeglab/eeglab.py", line 317, in __init__
eeg = _check_load_mat(input_fname, uint16_codec)
File "/Users/sheetal/opt/anaconda3/lib/python3.8/site-packages/mne/io/eeglab/eeglab.py", line 59, in _check_load_mat
eeg = read_mat(fname, uint16_codec=uint16_codec)
File "/Users/sheetal/opt/anaconda3/lib/python3.8/site-packages/mne/externals/pymatreader/pymatreader.py", line 78, in read_mat
raise IOError('The file %s does not exist.' % (filename,))
OSError: The file /Users/sheetal/Desktop/emotions/sub-01/eeg/sub-01_task-ImaginedEmotion_eeg.set does not exist.
我是新來使用 MNE python package 進行 EEG 信號處理並獲取錯誤 reading.set 文件
我偶爾會遇到這個問題。
.set 和對應的.fdt 文件實際上是存在的,但不幸的是 MNE 無法讀取這些文件,導致文件未找到錯誤。
這個問題似乎與EEGLab的生成文件有關,由於其開發不穩定,經常會產生很多錯誤。
建議:從 EEGLab 重新生成這些文件。
更新
目前,我發現我的問題與 EEGLab 和 Python-MNE 的不兼容版本有關。
以前,我使用 EEGLab 2019.1 生成.set 文件,使用 Python-MNE 0.20.4 讀取這些文件。
后來,EEGLab 發布了最新版本 2021.1 並禁用了 2019.1,這迫使我們使用最新版本。
當我將 EEGLab 2021.1 與不支持最新版本 EEGLab 的 MNE 0.20.4 一起使用時,問題就出現了。
將 MNE 更新到最新的 0.23.4 解決了我的問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.