Nifti_header_unreadable

Hi, so when I uploaded my dataset in the bids-validator, I got the above error, with more details as “We were unable to parse header data from this NIfTI file. Please ensure it is not corrupted or mislabeled”.

The nifti file is saved as this “HCP_DATA/sub-103818/dwi/sub-103818_acq-multishell_dwi.nii.gz

However, when I ran this using the command line version, it didn’t show me this error.

Also, there was a dataset which has been made BIDS-compatible by my senior and I had replicated the same structure. However for her case, it didn’t show this error either in the web-version or the command line version. Is there any error in my data?

It seems to be a bug or an over-interpretation of the new release of BIDS validator, I got the same error on my data even though the nifty files are perfectly readable by FSL for instance. I moved on to try with an earlier version of the BIDS validator (v1.9.3) and didn’t get this error.

Thanks a lot for the reply. Can you please share the link of the BIDS Validator v1.9.3?

Docker: docker pull bids/validator:v1.9.3
Singularity: singularity build bids_validator_1.9.3.img docker://bids/validator:v1.9.3
Python: pip install bids-validator==1.9.3

1 Like

I have the feeling that there is discrepancy between the Web application and the server version.

Attached is the output of the Web version
Interception_errors (1).txt (13.8 KB)

Below is the output of the console:

 bids-validator /Volumes/data/MRI_BIDS_DATABANK_TEMP/Interception
bids-validator@1.9.8
(node:91361) Warning: Closing directory handle on garbage collection
(Use `node --trace-warnings ...` to show where the warning was created)
	1: [WARN] Task scans should have a corresponding events.tsv file. If this is a resting state scan you can ignore this warning or rename the task to include the word "rest". (code: 25 - EVENTS_TSV_MISSING)
		./sub-3T001/func/sub-3T001_task-InterceptionPhase1_bold.nii.gz
		./sub-3T001/func/sub-3T001_task-InterceptionPhase2_bold.nii.gz
		./sub-3T001/func/sub-3T001_task-InterceptionPhase3_bold.nii.gz
		./sub-3T001/func/sub-3T001_task-InterceptionPhase4_bold.nii.gz
		./sub-3T002/func/sub-3T002_task-InterceptionPhase1_bold.nii.gz
		./sub-3T002/func/sub-3T002_task-InterceptionPhase2_bold.nii.gz
		./sub-3T002/func/sub-3T002_task-InterceptionPhase3_bold.nii.gz
		./sub-3T002/func/sub-3T002_task-InterceptionPhase4_bold.nii.gz
		./sub-3T003/func/sub-3T003_task-InterceptionPhase1_bold.nii.gz
		./sub-3T003/func/sub-3T003_task-InterceptionPhase2_bold.nii.gz
		... and 6 more files having this issue (Use --verbose to see them all).

	Please visit https://neurostars.org/search?q=EVENTS_TSV_MISSING for existing conversations about this issue.

	2: [WARN] Not all subjects contain the same files. Each subject should contain the same number of files with the same naming unless some files are known to be missing. (code: 38 - INCONSISTENT_SUBJECTS)
		./sub-3T001/func/sub-3T001_task-InterceptionPhase1_recording-cardiac_physio.json
			Evidence: Subject: sub-3T001; Missing file: sub-3T001_task-InterceptionPhase1_recording-cardiac_physio.json
		./sub-3T001/func/sub-3T001_task-InterceptionPhase1_recording-cardiac_physio.tsv.gz
			Evidence: Subject: sub-3T001; Missing file: sub-3T001_task-InterceptionPhase1_recording-cardiac_physio.tsv.gz
		./sub-3T001/func/sub-3T001_task-InterceptionPhase2_recording-cardiac_physio.json
			Evidence: Subject: sub-3T001; Missing file: sub-3T001_task-InterceptionPhase2_recording-cardiac_physio.json
		./sub-3T001/func/sub-3T001_task-InterceptionPhase2_recording-cardiac_physio.tsv.gz
			Evidence: Subject: sub-3T001; Missing file: sub-3T001_task-InterceptionPhase2_recording-cardiac_physio.tsv.gz
		./sub-3T001/func/sub-3T001_task-InterceptionPhase2_recording-respiratory_physio.json
			Evidence: Subject: sub-3T001; Missing file: sub-3T001_task-InterceptionPhase2_recording-respiratory_physio.json
		./sub-3T001/func/sub-3T001_task-InterceptionPhase2_recording-respiratory_physio.tsv.gz
			Evidence: Subject: sub-3T001; Missing file: sub-3T001_task-InterceptionPhase2_recording-respiratory_physio.tsv.gz
		./sub-3T001/func/sub-3T001_task-InterceptionPhase3_recording-cardiac_physio.json
			Evidence: Subject: sub-3T001; Missing file: sub-3T001_task-InterceptionPhase3_recording-cardiac_physio.json
		./sub-3T001/func/sub-3T001_task-InterceptionPhase3_recording-cardiac_physio.tsv.gz
			Evidence: Subject: sub-3T001; Missing file: sub-3T001_task-InterceptionPhase3_recording-cardiac_physio.tsv.gz
		./sub-3T001/func/sub-3T001_task-InterceptionPhase3_recording-respiratory_physio.json
			Evidence: Subject: sub-3T001; Missing file: sub-3T001_task-InterceptionPhase3_recording-respiratory_physio.json
		./sub-3T001/func/sub-3T001_task-InterceptionPhase3_recording-respiratory_physio.tsv.gz
			Evidence: Subject: sub-3T001; Missing file: sub-3T001_task-InterceptionPhase3_recording-respiratory_physio.tsv.gz
		... and 10 more files having this issue (Use --verbose to see them all).

	Please visit https://neurostars.org/search?q=INCONSISTENT_SUBJECTS for existing conversations about this issue.

	3: [WARN] Not all subjects/sessions/runs have the same scanning parameters. (code: 39 - INCONSISTENT_PARAMETERS)
		./sub-3T001/fmap/sub-3T001_dir-AP_epi.nii.gz
		./sub-3T001/fmap/sub-3T001_dir-PA_epi.nii.gz
		./sub-3T002/anat/sub-3T002_acq-csmp2rage_inv-1_part-mag_MP2RAGE.nii.gz

	Please visit https://neurostars.org/search?q=INCONSISTENT_PARAMETERS for existing conversations about this issue.

        Summary:                  Available Tasks:          Available Modalities: 
        192 Files, 12.52GB        InterceptionPhase1        MRI                   
        4 - Subjects              InterceptionPhase2                              
        1 - Session               InterceptionPhase3                              
                                  InterceptionPhase4                              


	If you have any questions, please post on https://neurostars.org/tags/bids.

I think you can discard this error for now. The dataset which showed this error in the Web browser was fine going through FMRIPREP from instance.

note that the Python validator is not a full bids-validator, see also: GitHub - bids-standard/bids-validator: Validator for the Brain Imaging Data Structure

There are is a limited library of helper functions written in Python. The main function determines if a file extension is compliant with the BIDS specification.