You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AttributeError during reading the raw MEG fif file using read_raw_fif #7844
I tried to read my raw MEG .fif file using the mne.io.read_raw_fif function and the next error apperas:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "Y:\LevchenkoE\ISC\Experiment3_videos_MEG\MCCA-MEG\venv\lib\site-packages\mne\io\fiff\raw.py", line 453, in read_raw_fif preload=preload, verbose=verbose)
File "<decorator-gen-169>", line 21, in __init__
File "Y:\LevchenkoE\ISC\Experiment3_videos_MEG\MCCA-MEG\venv\lib\site-packages\mne\io\fiff\raw.py", line 117, in __init__ self._preload_data(preload)
File "<decorator-gen-150>", line 21, in _preload_data
File "Y:\LevchenkoE\ISC\Experiment3_videos_MEG\MCCA-MEG\venv\lib\site-packages\mne\io\base.py", line 488, in _preload_data self._data = self._read_segment(data_buffer=data_buffer)
File "<decorator-gen-148>", line 21, in _read_segment
File "Y:\LevchenkoE\ISC\Experiment3_videos_MEG\MCCA-MEG\venv\lib\site-packages\mne\io\base.py", line 387, in _read_segment cals, mult)
File "Y:\LevchenkoE\ISC\Experiment3_videos_MEG\MCCA-MEG\venv\lib\site-packages\mne\io\fiff\raw.py", line 355, in _read_segment_file one.shape = (picksamp, self.info['nchan'])
AttributeError: 'NoneType' object has no attribute 'shape'
I tried to read the same file with BrainStrom and it is reading successfully, but without events. At the same time if I open the raw file without preload=True parameter I can see the events:
For me this is very strange because I can read other files of the same subject. The parameters of recording were exactly the same. The record is splitted to several files just because our MEG system cannot record more than 2Gb in one file and that is why, during the break, we need to push stop (and save the file) and start recording to a new file, but the acquistion parameters weren't changed at all.
I have attached the link to files: one readable (good) and one with an error (bad).
Activity
larsoner commentedon May 28, 2020
Was this file produced by the standard acquisition system? The FIF
tagheader in one of the raw buffers says that there is no data:This is despite the entry in the FIF directory tree indicating that it should be non-zero:
We can turn this into a series of zeros, but to properly mark it as an acquisition skip will be a bit harder...
It would be better to fix this at the acquisition end if possible instead.