Mne-python: How to solve the problem of TypeError

Created on 9 Sep 2020  ·  9Comments  ·  Source: mne-tools/mne-python

Traceback (most recent call last):
File "D:/mne使用/use01.py", line 15, in
raw = mne.io.read_raw_eeglab(r'D:\脑电数据原始\ex2\sub1902.set',preload=False)
File "D:\mne使用\venv\lib\site-packages\mne\io\eeglab\eeglab.py", line 221, in read_raw_eeglab
return RawEEGLAB(input_fname=input_fname, preload=preload,
File "", line 21, in __init__
File "D:\mne使用\venv\lib\site-packages\mne\io\eeglab\eeglab.py", line 319, in __init__
eeg = _check_load_mat(input_fname, uint16_codec)
File "D:\mne使用\venv\lib\site-packages\mne\io\eeglab\eeglab.py", line 59, in _check_load_mat
eeg = read_mat(fname, uint16_codec=uint16_codec)
File "D:\mne使用\venv\lib\site-packages\mne\externals\pymatreader\pymatreader.py", line 82, in read_mat
raw_data = scipy.io.loadmat(fid, struct_as_record=True,
File "D:\mne使用\venv\lib\site-packages\scipy\io\matlab\mio.py", line 224, in loadmat
matfile_dict = MR.get_variables(variable_names)
File "D:\mne使用\venv\lib\site-packages\scipy\io\matlab\mio5.py", line 333, in get_variables
res = self.read_var_array(hdr, process)
File "D:\mne使用\venv\lib\site-packages\scipy\io\matlab\mio5.py", line 293, in read_var_array
return self._matrix_reader.array_from_header(header, process)
File "mio5_utils.pyx", line 671, in scipy.io.matlab.mio5_utils.VarReader5.array_from_header
File "mio5_utils.pyx", line 719, in scipy.io.matlab.mio5_utils.VarReader5.array_from_header
File "mio5_utils.pyx", line 966, in scipy.io.matlab.mio5_utils.VarReader5.read_struct
File "mio5_utils.pyx", line 669, in scipy.io.matlab.mio5_utils.VarReader5.read_mi_matrix
File "mio5_utils.pyx", line 713, in scipy.io.matlab.mio5_utils.VarReader5.array_from_header
File "mio5_utils.pyx", line 876, in scipy.io.matlab.mio5_utils.VarReader5.read_char
TypeError: buffer is too small for requested array

Process finished with exit code 1

All 9 comments

you have a problem to read an eeglab file? if can you share it after checking you can read it in matlab?

你的中文路径暴露了你。

你的中文路径暴露了你。

对我来说,他的中文路径没有问题。

你的中文路径暴露了你。

对我来说,他的中文路径没有问题。

I know, I'm just saying that indicates that he/she is Chinese as same as me.

I know, I'm just saying that indicates that he/she is Chinese as same as me.

Yes, I understood. I just thought it was a little off-topic to point it out, since it's likely not the cause of the ValueError

I know, I'm just saying that indicates that he/she is Chinese as same as me.

Yes, I understood. I just thought it was a little off-topic to point it out, since it's likely not the cause of the ValueError

understood.

yeah,I am Chinese student.I very happy to receive your answer.it is not because of the error caused by the Chinses path.and i can open the .set file with EEGLAB successfully,and i can load it in RAM in mne but sometimes it still goes wrong.so it is unreliable. 

------------------ 原始邮件 ------------------
发件人: "Daniel McCloy"<[email protected]>;
发送时间: 2020年9月10日(星期四) 晚上9:29
收件人: "mne-tools/mne-python"<[email protected]>;
抄送: "_殇灬沈淪地獄"<[email protected]>; "Author"<[email protected]>;
主题: Re: [mne-tools/mne-python] How to solve the problem of TypeError (#8226)

I know, I'm just saying that indicates that he/she is Chinese as same as me.

Yes, I understood. I just thought it was a little off-topic to point it out, since it's likely not the cause of the ValueError


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Same problem, have you solved it?

@Mymiku can you provide us with a link to a file that opens fine in EEGLAB but gives this error in MNE-Python? We cannot easily debug if we cannot reproduce it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jona-sassenhagen picture jona-sassenhagen  ·  33Comments

rob-luke picture rob-luke  ·  51Comments

choldgraf picture choldgraf  ·  42Comments

hoechenberger picture hoechenberger  ·  43Comments

kingjr picture kingjr  ·  36Comments