Python - MNE - 无法加载.fif文件

时间:2017-02-21 11:21:58

标签: python python-2.7 file object mne-python

我尝试运行这三行代码:

import mne

myfile = 'test_raw.fif'
raw = mne.io.read_raw_fif(myfile)

它应该加载.fif文件 它是http://martinos.org/mne/stable/index.html

的例子

当我尝试使用他们的样本数据时,它可以工作!当我使用我自己的记录数据运行它时,我得到了这个Errorstack:

> runfile('C:/Felix/Uni/Bachelorarbeit/mne/untitled2.py',
> wdir='C:/Felix/Uni/Bachelorarbeit/mne') Opening raw data file
> C:\Felix\Uni\Bachelorarbeit\mne\test_raw.fif... Traceback (most recent
> call last):   File "<stdin>", line 1, in <module>   File
> "C:\Users\Felix\Anaconda2\lib\site-packages\spyder\utils\site\sitecustomize.py",
> line 866, in runfile
>     execfile(filename, namespace)   File "C:\Users\Felix\Anaconda2\lib\site-packages\spyder\utils\site\sitecustomize.py",
> line 87, in execfile
>     exec(compile(scripttext, filename, 'exec'), glob, loc)   File "C:/Felix/Uni/Bachelorarbeit/mne/untitled2.py", line 4, in <module>
>     raw = mne.io.read_raw_fif(myfile)   File "C:\Users\Felix\Anaconda2\lib\site-packages\mne\io\fiff\raw.py", line
> 519, in read_raw_fif
>     add_eeg_ref=add_eeg_ref, fnames=fnames, verbose=verbose)   File "<string>", line 2, in __init__   File
> "C:\Users\Felix\Anaconda2\lib\site-packages\mne\utils.py", line 708,
> in verbose
>     return function(*args, **kwargs)   File "C:\Users\Felix\Anaconda2\lib\site-packages\mne\io\fiff\raw.py", line
> 109, in __init__
>     preload, do_check_fname)   File "<string>", line 2, in _read_raw_file   File "C:\Users\Felix\Anaconda2\lib\site-packages\mne\utils.py", line 708,
> in verbose
>     return function(*args, **kwargs)   File "C:\Users\Felix\Anaconda2\lib\site-packages\mne\io\fiff\raw.py", line
> 186, in _read_raw_file
>     ff, tree, _ = fiff_open(fname, preload=whole_file)   File "<string>", line 2, in fiff_open   File
> "C:\Users\Felix\Anaconda2\lib\site-packages\mne\utils.py", line 708,
> in verbose
>     return function(*args, **kwargs)   File "C:\Users\Felix\Anaconda2\lib\site-packages\mne\io\open.py", line 146,
> in fiff_open
>     tree, _ = make_dir_tree(fid, directory)   File "<string>", line 2, in make_dir_tree   File
> "C:\Users\Felix\Anaconda2\lib\site-packages\mne\utils.py", line 708,
> in verbose
>     return function(*args, **kwargs)   File "C:\Users\Felix\Anaconda2\lib\site-packages\mne\io\tree.py", line 56,
> in make_dir_tree
>     if directory[start].kind == FIFF_BLOCK_START: TypeError: 'NoneType' object has no attribute '__getitem__'

我下载了“头脑风暴”,它可以说明.fif-Files。 可以显示来自MNE的Sampledate。如果我尝试我的,他们就不会。

:/

0 个答案:

没有答案