- MNE-Python version: 0.23.0
- operating system: Windows 10
I was trying to read openneuro dataset with MNE_BIDS (OSF | Prediction Error), to run a different analysis with MNE. However, I’m having mat error as below.
It seems that the authors have used MATLAB EEGLAB for their analysis. Is there a chance that this could cause a problem??
ValueError: Unknown mat file type, version 99, 57
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-56-96f3ea41320a> in <module>
6 bids_path
7
----> 8 raw = read_raw_bids(bids_path=bids_path, verbose=False)
~\AppData\Roaming\Python\Python38\site-packages\mne_bids\read.py in read_raw_bids(bids_path, extra_params, verbose)
646 extra_params['allow_maxshield'] = True
647
--> 648 raw = _read_raw(bids_fpath, electrode=None, hsp=None, hpi=None,
649 config=config, verbose=None, **extra_params)
650
~\AppData\Roaming\Python\Python38\site-packages\mne_bids\read.py in _read_raw(raw_fpath, electrode, hsp, hpi, allow_maxshield, config, verbose, **kwargs)
54
55 elif ext in ['.ds', '.vhdr', '.set', '.edf', '.bdf']:
---> 56 raw = reader[ext](raw_fpath, **kwargs)
57
58 # MEF and NWB are allowed, but not yet implemented
C:\ProgramData\Anaconda3\lib\site-packages\mne\io\eeglab\eeglab.py in read_raw_eeglab(input_fname, eog, preload, uint16_codec, verbose)
217 .. versionadded:: 0.11.0
218 """
--> 219 return RawEEGLAB(input_fname=input_fname, preload=preload,
220 eog=eog, verbose=verbose, uint16_codec=uint16_codec)
221
<decorator-gen-241> in __init__(self, input_fname, eog, preload, uint16_codec, verbose)
C:\ProgramData\Anaconda3\lib\site-packages\mne\io\eeglab\eeglab.py in __init__(self, input_fname, eog, preload, uint16_codec, verbose)
316 preload=False, uint16_codec=None, verbose=None): # noqa: D102
317 input_fname = _check_fname(input_fname, 'read', True, 'input_fname')
--> 318 eeg = _check_load_mat(input_fname, uint16_codec)
319 if eeg.trials != 1:
320 raise TypeError('The number of trials is %d. It must be 1 for raw'
C:\ProgramData\Anaconda3\lib\site-packages\mne\io\eeglab\eeglab.py in _check_load_mat(fname, uint16_codec)
57 """Check if the mat struct contains 'EEG'."""
58 from ...externals.pymatreader import read_mat
---> 59 eeg = read_mat(fname, uint16_codec=uint16_codec)
60 if 'ALLEEG' in eeg:
61 raise NotImplementedError(
C:\ProgramData\Anaconda3\lib\site-packages\mne\externals\pymatreader\pymatreader.py in read_mat(filename, variable_names, ignore_fields, uint16_codec)
82 try:
83 with open(filename, 'rb') as fid: # avoid open file warnings on error
---> 84 mjv, _ = get_matfile_version(fid)
85 extra_kwargs = {}
86 if mjv == 1:
C:\ProgramData\Anaconda3\lib\site-packages\scipy\io\matlab\miobase.py in get_matfile_version(fileobj)
229 if maj_val in (1, 2):
230 return ret
--> 231 raise ValueError('Unknown mat file type, version %s, %s' % ret)
232
233
ValueError: Unknown mat file type, version 99, 57