Dear MNE community,
I am experiencing an error that I don't understand when trying to create
a raw object in Python. The traceback is below, and I only get this
with the raw files from one subject. I initially thought that it could
be due to the abnormally large file sizes of this subject's raw data
(~700 Mb), but I have one other subject whose raw data were comparable
and I can create raw objects from those data without issue.
Has anyone experienced this?
Cheers,
Andy
error Traceback (most recent call last)
/home/andrew/Experiments/Awareness_wo_Attention/<ipython-input-8-5fbcd28d6772>
in <module>()
----> 1
runfile(r'/home/andrew/Experiments/Awareness_wo_Attention/py_tmp_check_dataset_channels.py',
wdir=r'/home/andrew/Experiments/Awareness_wo_Attention')
/usr/local/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/sitecustomize.pyc
in runfile(filename, args, wdir, namespace)
485 pass
486 os.chdir(wdir)
--> 487 execfile(filename, namespace)
488 sys.argv = ['']
489 namespace.pop('__file__')
/home/andrew/Experiments/Awareness_wo_Attention/py_tmp_check_dataset_channels.py
in <module>()
48 for block in range(2):
49 fname.append(data_path + '/' + subject + '/meg/' +
subject + '_block' + str(block+1) + '_cleaned_raw.fif')
---> 50 raw.append(mne.fiff.Raw(fname[block]))
51 chan.append(raw[block].ch_names)
52 chan.append([x for x in chan[0] if x not in set(chan[1])])
/usr/local/lib/python2.7/dist-packages/mne-0.6.git-py2.7.egg/mne/utils.pyc
in dec(*args, **kwargs)
263 return ret
264 else:
--> 265 return function(*args, **kwargs)
266
267 # set __wrapped__ attribute so ?? in IPython gets the right
source
/usr/local/lib/python2.7/dist-packages/mne-0.6.git-py2.7.egg/mne/fiff/raw.pyc
in __init__(self, fnames, allow_maxshield, preload, verbose, proj_active)
83
84 raws = [self._read_raw_file(fname, allow_maxshield,
preload)
---> 85 for fname in fnames]
86
87 _check_raw_compatibility(raws)
/usr/local/lib/python2.7/dist-packages/mne-0.6.git-py2.7.egg/mne/utils.pyc
in dec(*args, **kwargs)
263 return ret
264 else:
--> 265 return function(*args, **kwargs)
266
267 # set __wrapped__ attribute so ?? in IPython gets the right
source
/usr/local/lib/python2.7/dist-packages/mne-0.6.git-py2.7.egg/mne/fiff/raw.pyc
in _read_raw_file(self, fname, allow_maxshield, preload, verbose)
137 ext = os.path.splitext(fname)[1].lower()
138 whole_file = preload if '.gz' in ext else False
--> 139 fid, tree, _ = fiff_open(fname, preload=whole_file)
140
141 # Read the measurement info
/usr/local/lib/python2.7/dist-packages/mne-0.6.git-py2.7.egg/mne/utils.pyc
in dec(*args, **kwargs)
263 return ret
264 else:
--> 265 return function(*args, **kwargs)
266
267 # set __wrapped__ attribute so ?? in IPython gets the right
source
/usr/local/lib/python2.7/dist-packages/mne-0.6.git-py2.7.egg/mne/fiff/open.pyc
in fiff_open(fname, preload, verbose)
83 while tag.next >= 0:
84 pos = fid.tell()
---> 85 tag = read_tag_info(fid)
86 tag.pos = pos
87 directory.append(tag)
/usr/local/lib/python2.7/dist-packages/mne-0.6.git-py2.7.egg/mne/fiff/tag.pyc
in read_tag_info(fid)
67 """
68 s = fid.read(4 * 4)
---> 69 tag = Tag(*struct.unpack(">iiii", s))
70 if tag.next == 0:
71 fid.seek(tag.size, 1)
error: unpack requires a string argument of length 16