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?
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.
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?
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.