- MNE version: 0.24.0
- operating system: Windows 10
hello, I’m new in MNE and i just wanted to try the first tutorial:
import numpy as np
import mne
sample_data_folder = mne.datasets.sample.data_path()
sample_data_raw_file = (sample_data_folder,‘MEG’,‘sample’,
‘sample_audvis_filt-0-40_raw.fif’)
Until this point it’s working.
Then, this is the line that return an error:
raw = mne.io.read_raw_fif(sample_data_raw_file)
return:
TypeError Traceback (most recent call last)
Input In [2], in <cell line: 4>()
1 sample_data_folder = mne.datasets.sample.data_path()
2 sample_data_raw_file = (sample_data_folder,‘MEG’,‘sample’,
3 ‘sample_audvis_filt-0-40_raw.fif’)
----> 4 raw = mne.io.read_raw_fif(sample_data_raw_file)
File ~\anaconda3\lib\site-packages\mne\io\fiff\raw.py:473, in read_raw_fif(fname, allow_maxshield, preload, on_split_missing, verbose)
438 @fill_doc
439 def read_raw_fif(fname, allow_maxshield=False, preload=False,
440 on_split_missing=‘raise’, verbose=None):
441 “”“Reader function for Raw FIF data.
442
443 Parameters
(…)
471 … versionadded:: 0.9.0
472 “””
→ 473 return Raw(fname=fname, allow_maxshield=allow_maxshield,
474 preload=preload, verbose=verbose,
475 on_split_missing=on_split_missing)
File :24, in init(self, fname, allow_maxshield, preload, on_split_missing, verbose)
File ~\anaconda3\lib\site-packages\mne\io\fiff\raw.py:81, in Raw.init(self, fname, allow_maxshield, preload, on_split_missing, verbose)
78 next_fname = fname
79 while next_fname is not None:
80 raw, next_fname, buffer_size_sec =
—> 81 self._read_raw_file(next_fname, allow_maxshield,
82 preload, do_check_ext)
83 do_check_ext = False
84 raws.append(raw)
File :24, in _read_raw_file(self, fname, allow_maxshield, preload, do_check_ext, verbose)
File ~\anaconda3\lib\site-packages\mne\io\fiff\raw.py:136, in Raw._read_raw_file(self, fname, allow_maxshield, preload, do_check_ext, verbose)
132 @verbose
133 def _read_raw_file(self, fname, allow_maxshield, preload,
134 do_check_ext=True, verbose=None):
135 “”“Read in header information from a raw file.”“”
→ 136 logger.info(‘Opening raw data file %s…’ % fname)
138 # Read in the whole file if preload is on and .fif.gz (saves time)
139 if not _file_like(fname):
TypeError: not all arguments converted during string formatting
I tried with others files from others tutorials but the issue is always the same.
I can’t find on the web others with this same issue… someone to help a biginner?
Thanks!
Clem