File does not start with a file id tag

  • MNE version: 1.1.1
  • operating system: macOS 12.3

Hello, so I am trying to open a file on colab, after correctly synching it with my google drive.

The file is in .ipynb, this is my input:

fname = 'basic eeg pipeline.ipynb'

raw = fname )

And this is the output:

Opening raw data file basic eeg pipeline.ipynb...

<ipython-input-7-ad53827e7af2>:1: RuntimeWarning: This filename (basic eeg pipeline.ipynb) does not conform to MNE naming conventions. All raw files should end with raw.fif, raw_sss.fif, raw_tsss.fif, _meg.fif, _eeg.fif, _ieeg.fif, raw.fif.gz, raw_sss.fif.gz, raw_tsss.fif.gz, _meg.fif.gz, _eeg.fif.gz or _ieeg.fif.gz raw = fname )


ValueError Traceback (most recent call last)

[<ipython-input-7-ad53827e7af2>]( in <module> ----> 1 raw = fname )

4 frames

<decorator-gen-366> in __init__(self, fname, allow_maxshield, preload, on_split_missing, verbose)

<decorator-gen-367> in _read_raw_file(self, fname, allow_maxshield, preload, do_check_ext, verbose)

<decorator-gen-127> in fiff_open(fname, preload, verbose)

[/usr/local/lib/python3.7/dist-packages/mne/io/]( in _fiff_open(fname, fid, preload) 143 prefix = f'file {repr(fname)} does not' 144 if tag.kind != FIFF.FIFF_FILE_ID: --> 145 raise ValueError(f'{prefix} start with a file id tag') 146 147 if tag.type != FIFF.FIFFT_ID_STRUCT:

ValueError: file '/gdrive/MyDrive/Jupyter Notebook/EEG data/basic eeg pipeline.ipynb' does not start with a file id tag

I have found a similar thread but it was for Windows 10, so what worked for them didn’t for me.

Thank you so so much in advance!!

Hello, the file you’re trying to load is a Jupyter Notebook, not neurophysiological data in a FIFF file… hence this cannot work.

Best wishes,

Hello Richard, thank you very much for the answer. I am a bit confused, how can I move a file from a Jupyter notebook into a different, readable format? Thank you and sorry for the silly question!

Hello, to be honest, this question doesn’t make much sense to me … I think there’s some fundamental misunderstanding here somewhere. It appears you’re trying to load a Jupyter Notebook file with MNE-Python, but MNE-Python is meant to read and write neurophysiological data, not Jupyter Notebooks. Have you tried opening the file in Jupyter Notebook or Jupyter Lab directly?

Best wishes,

Hello Richard, sorry for being unclear. I am following a tutorial that says that from colab, I should be able to open my google drive and any jupyter notebook file within it.
But it’s okay I think I figured out a way around it :slight_smile: Thanks a lot anyway!


1 Like