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 = mne.io.read_raw_fif( 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 = mne.io.read_raw_fif( fname )

---------------------------------------------------------------------------

ValueError Traceback (most recent call last)

[<ipython-input-7-ad53827e7af2>](https://e81s0qkocef-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20221005-060049-RC00_479005510#) in <module> ----> 1 raw = mne.io.read_raw_fif( 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/open.py](https://e81s0qkocef-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20221005-060049-RC00_479005510#) 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,
Richard

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,
Richard

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!

Best,
Irene

1 Like