problems cloning git repository

Hello everyone,

I have cloned this git repository: GitHub - OpenNeuroDatasets/ds004837: OpenNeuro dataset - Magnetoencephalographic (MEG) Pitch and Duration Mismatch Negativity (MMN) in First-Episode Psychosis
in cloab.
In principle, it is cloned, git remote is correct, but when trying to read the fiff file
fname = “/content/drive/MyDrive/…/ds004837/sub-2218A/ses-0001/meg/sub-2218A_ses-0001_task-attnmod_run-01_meg.fif”
raw =

I’ve also tried just: raw =
but I get the same result.

it gives me this error:
Opening raw data file /content/drive/MyDrive/…sub-2218A_ses-0001_task-attnmod_run-01_meg.fif…

FileNotFoundError Traceback (most recent call last)
in <cell line: 1>()
----> 1 raw =

3 frames
in init(self, fname, allow_maxshield, preload, on_split_missing, verbose)

in _read_raw_file(self, fname, allow_maxshield, preload, do_check_ext, verbose)

in _check_fname(fname, overwrite, must_exist, name, need_dir, verbose)

/usr/local/lib/python3.10/dist-packages/mne/utils/ in _check_fname(fname, overwrite, must_exist, name, need_dir, verbose)
261 raise PermissionError(f"{name} does not have read permissions: {fname}")
262 elif must_exist:
→ 263 raise FileNotFoundError(f’{name} does not exist: “{fname}”')
265 return fname

FileNotFoundError: fname does not exist: “/content/drive/MyDrive/…sub-2218A/ses-0001/meg/sub-2218A_ses-0001_task-attnmod_run-01_meg.fif”

For more information, if I bring the file from local and try to read it, it still gives me this other error: ValueError: file ‘/content/drive/MyDrive/…/sub-01_task-abseq_run-01_meg.fif’ does not start with a file id tag

Any help is appreciated, I am new to cloning from git and handling these types of files, sincere thanks!


  • MNE version: e.g. 1.6.0
  • operating system: Windows 10

Hello @Xavis and welcome to the forum!

You cannot simply clone OpenNeuro datasets from GitHub. That is, you can do it, but they’re special – you’d need datalad or another tool to actually use the data.

What you should do instead is follow the instructions on the OpenNeuro website:

You can also use openneuro-py to fetch the data.

Please also note that for reading, you should use MNE-BIDS and not “pure” MNE-Python functions.

Best wishes,


Thanks for the welcome!
Very kind of your response, I’m going to try doing it.

Grateful Richard!


1 Like

Hello again,
I have been able to clone the files successfully from git-hub with ssh. But when trying to read a fiff file with mne-bids I get this error:

ValueError Traceback (most recent call last) [c:\Users.…\ds004837_datalab.ipynb](file:///C:/Users/…/ds004837_datalab.ipynb) Cell 19 line 1 ----> 1 raw = File [c:\Users.…\lib\site-packages\mne\](file:///C:/Users/…/lib/site-packages/mne/io/, in read_raw(fname, preload, verbose, **kwargs) [155](file:///C:/Users/…/lib/site-packages/mne/io/ for reader in these_readers: [156](file:///C:/Users/…/lib/site-packages/mne/io/ try: → [157](file:///C:/Users/…/lib/site-packages/mne/io/ return reader(fname, **kwargs) [158](file:///C:/Users/…/lib/site-packages/mne/io/ except Exception: [159](file:///C:/Users/…/lib/site-packages/mne/io/ if len(these_readers) == 1: File [c:\Users.…\lib\site-packages\mne\io\fiff\](file:///C:/Users/…/lib/site-packages/mne/io/fiff/, in read_raw_fif(fname, allow_maxshield, preload, on_split_missing, verbose) [502](file:///C:/Users/…/lib/site-packages/mne/io/fiff/ @fill_doc [503](file:///C:/Users/…/lib/site-packages/mne/io/fiff/ def read_raw( [504](file:///C:/Users/…/lib/site-packages/mne/io/fiff/ fname, allow_maxshield=False, preload=False, on_split_missing=“raise”, verbose=None [505](file:///C:/Users/…/lib/site-packages/mne/io/fiff/ ): [506](file:///C:/Users/…/lib/site-packages/mne/io/fiff/ “”“Reader function for Raw FIF data. [507](file:///C:/Users/…/lib/site-packages/mne/io/fiff/ [508](file:///C:/Users/…/lib/site-packages/mne/io/fiff/ Parameters (…) [541](file:///C:/Users/…/lib/site-packages/mne/io/fiff/ are updated accordingly. [542](file:///C:/Users/…/lib/site-packages/mne/io/fiff/ “”” → [543](file:///C:/Users/…/lib/site-packages/mne/io/fiff/ return Raw( [544](file:///C:/Users/…/lib/site-packages/mne/io/fiff/ fname=fname,

→ [147](file:///C:/Users/…/lib/site-packages/mne/_fiff/ raise ValueError(f"{prefix} start with a file id tag") [149](file:///C:/Users/…/lib/site-packages/mne/_fiff/ if tag.type != FIFF.FIFFT_ID_STRUCT: [150](file:///C:/Users/…/lib/site-packages/mne/_fiff/ raise ValueError(f"{prefix} start with a file id tag") ValueError: file ‘C:\Users\…\ds004837\sub-2387A\ses-0001\meg\sub-2387A_ses-0001_task-attnmod_run-01_meg.fif’ does not start with a file id tag

I have used this code:
fname = “path to file”
raw =

Does anyone know why? Where this error?

I work locally from VSCode with Anaconda3

Thank you!

Hello, like I said, simply cloning the repository with git is not enough! This will not copy the data files properly, only references to the files. Hence you cannot load them. This is because they are stored in a special way using git-annex. You cannot treat the OpenNeuro repositories like ordinary git repositories.

Please follow the instructions from the OpenNeuro website I linked to above.


Thanks again Richard, you have put me on the right path, downloading and reading files is correct now. In case it helps someone in the future: to read the data without a file start error, in my case I had to configure (preload=True) as the raw reading parameter.
The only problem is that the MEG frequency graph is not interactive for me, I guess it depends on the colab configuration.

All the best!


1 Like