ValueError: Split raw file detected` — but there is only one `.fif` file (OpenNeuro ds004212)

MNE version: 1.8.0
OS : Windows 11

Hi all,
I’m encountering this error when trying to load a .fif MEG file using mne.io.read_raw_fif:

ValueError: Split raw file detected but next file ...-1.fif does not exist. Ensure all files were transferred properly and that split and original files were not manually renamed on disk (split files should be renamed by loading and re-saving with MNE-Python to preserve proper filename linkage).

But there’s only one .fif file in the folder, plus its .json sidecar — no -1.fif exists. This same script runs fine on other subjects from the same dataset.
The data comes from:

Minimal Working Example:

import mne

fpath = "path/to/sub-2252A_ses-0001_task-attnmod_run-01_meg.fif"
raw = mne.io.read_raw_fif(fpath, preload=True)

Why is MNE interpreting this as a split file when no -1.fif exists?
Is there a flag or metadata field inside the .fif that triggers this behavior?
Would loading and re-saving the file with MNE (raw.save()) bypass this issue?
Has anyone else encountered this with OpenNeuro files?

Not sure that the OpenNeuro link that you provided is correct - that goes to the ThingsMEG dataset, which is a CTF dataset and doesn’t have sub-2252A.

-Jeff

My apologies, you are right. This is the correct dataset:

When you say that this runs fine on other subjects - did you try them all? Many seem to have the splitfile issue. It looks like they changed the sampling rate after the first few subjects from 1000 to 3000Hz. That should triple the filesize. The first couple that work are 741 MB, so tripling the filesize puts it over the 2G split filesize limit.

I suspect those are really missing the -1.fif parts and the error message is true. I downloaded a few and the 2G ones all report the same split part issue.

du -sh sub-22*.fif 
741M	sub-2247A_ses-0001_task-attnmod_run-01_meg.fif
2.0G	sub-2252A_ses-0001_task-attnmod_run-01_meg.fif
2.0G	sub-2253A_ses-0001_task-attnmod_run-01_meg.fif
2.0G	sub-2259A_ses-0001_task-attnmod_run-01_meg.fif

You may want to post this as a question to the data authors and see if they can fix.

1 Like

I agree with @jstout211 that files appear to be missing. You should contact the creators of this dataset.

Aside from that, don’t load the files like this:

Instead, use MNE-BIDS to load the files. The BIDS naming for split files is *_split-X_*. MNE-BIDS will take care of this if the file exists.

Best wishes,
Richard

Thank you both for your replies. I contacted the creators, and they confirmed that some of the data was recorded at the wrong sampling rate (3000 instead of 1000), which must be corrected during preprocessing. However, there seem to be no other files, and they can open the files the way they are on their end. Is there any other way to load the files and downsample them to 1000Hz?

@larsoner Do you have any idea what we could do here?

If the files were split during writing by mne-bids but not uploaded to OpenNeuro by the dataset curators, then there’s no way to get that data back. They need to upload a second file for this subject, it is missing:

Thank you for your reply. I sent another email to the creators asking whether they have the split files locally or if maybe they have them merged after recording. I will update the post when they respond.

best,
Saeid