, 使用 MNE python 包进行 EEG 信号处理时读取 .set 文件时出错

问题描述

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)

输出

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 包进行 EEG 信号处理和读取 .set 文件时出错的新手

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)