raw = mne.io.read_raw('0116_tss_raw.fif')
print(raw.filenames)
OUTPUT:
FileNotFoundError Traceback (most recent call last)
Input In [32], in <cell line: 1>()
----> 1 raw = mne.io.read_raw(‘0116_tss_raw.fif’)
2 print(raw.filenames)
File ~\anaconda3\lib\site-packages\mne\io_read_raw.py:96, in read_raw(fname, preload, verbose, **kwargs)
94 ext = “”.join(Path(fname).suffixes)
95 if ext in readers:
—> 96 return readers[ext](fname, preload=preload, verbose=verbose, **kwargs)
97 else:
98 _read_unsupported(fname)
File ~\anaconda3\lib\site-packages\mne\io\fiff\raw.py:482, in read_raw_fif(fname, allow_maxshield, preload, on_split_missing, verbose)
442 @fill_doc
443 def read_raw_fif(fname, allow_maxshield=False, preload=False,
444 on_split_missing=‘raise’, verbose=None):
445 “”“Reader function for Raw FIF data.
446
447 Parameters
(…)
480 are updated accordingly.
481 “””
→ 482 return Raw(fname=fname, allow_maxshield=allow_maxshield,
483 preload=preload, verbose=verbose,
484 on_split_missing=on_split_missing)
File :12, 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 :12, in _read_raw_file(self, fname, allow_maxshield, preload, do_check_ext, verbose)
File ~\anaconda3\lib\site-packages\mne\io\fiff\raw.py:146, in Raw._read_raw_file(self, fname, allow_maxshield, preload, do_check_ext, verbose)
144 check_fname(fname, ‘raw’, endings)
145 # filename
→ 146 fname = _check_fname(fname, ‘read’, True, ‘fname’)
147 ext = os.path.splitext(fname)[1].lower()
148 whole_file = preload if ‘.gz’ in ext else False
File :12, in _check_fname(fname, overwrite, must_exist, name, need_dir, verbose)
File ~\anaconda3\lib\site-packages\mne\utils\check.py:244, in _check_fname(fname, overwrite, must_exist, name, need_dir, verbose)
241 raise PermissionError(
242 f’{name} does not have read permissions: {fname}’)
243 elif must_exist:
→ 244 raise FileNotFoundError(f’{name} does not exist: {fname}’)
246 return fname
FileNotFoundError: fname does not exist: C:\Users\test\Documents\Karin_kandidat\0116_tss_raw.fif
import mne
mne.sys_info()
OUTPUT:
Platform: Windows-10-10.0.19042-SP0
Python: 3.9.12 (main, Apr 4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)]
Executable: C:\Users\test\anaconda3\python.exe
CPU: Intel64 Family 6 Model 78 Stepping 3, GenuineIntel: 4 cores
Memory: 7.4 GB
mne: 1.0.3
numpy: 1.21.5 {blas=mkl_rt, lapack=mkl_rt}
scipy: 1.7.3
matplotlib: 3.5.1 {backend=module://ipympl.backend_nbagg}
sklearn: 1.0.2
numba: 0.55.1
nibabel: Not found
nilearn: Not found
dipy: Not found
cupy: Not found
pandas: 1.4.2
pyvista: Not found
pyvistaqt: Not found
ipyvtklink: Not found
vtk: Not found
PyQt5: 5.9.2
ipympl: 0.9.1
pooch: v1.6.0
mne_bids: Not found
mne_nirs: Not found
mne_features: Not found
mne_qt_browser: Not found
mne_connectivity: Not found
I can see that there is a folder missing in the directory. The files are located at:
fname1 =‘C:/Users/test/Documents/Karin_kandidat/Raw_data/0116/0116_tsss_raw.fif’
fname2=‘C:/Users/test/Documents/Karin_kandidat/Raw_data/0116/0116_tsss_raw-1.fif’
fname3 =‘C:/Users/test/Documents/Karin_kandidat/Raw_data/0116/0116_tsss_raw-2.fif’