nipreps / fmriprep

fMRIPrep is a robust and easy-to-use pipeline for preprocessing of diverse fMRI data. The transparent workflow dispenses of manual intervention, thereby ensuring the reproducibility of the results.
https://fmriprep.org
Apache License 2.0
638 stars 294 forks source link

loading of bids-filter-file crash on integer/float values #3394

Open bpinsard opened 1 week ago

bpinsard commented 1 week ago

What happened?

setting a json bids-filter-file with eg: "inv": 2, will make the following line crash

https://github.com/nipreps/fmriprep/blob/08fecee54e95de4385019ed4b70b64e445eae158/fmriprep/config.py#L521

with

    if not isinstance(value, Query) and 'Query' in value
                                        ^^^^^^^^^^^^^^^^
TypeError: argument of type 'int' is not iterable

What command did you use?

datalad containers-run -n containers/bids-fmriprep -- --fs-license-file freesurfer.license --participant-label 01 --work-dir /tmp --omp-nthreads 8 --nprocs 12 --mem_mb 32000 --output-spaces MNI152NLin2009cAsym T1w:res-iso2mm --cifti-output 91k --output-layout bids --ignore slicetiming --fs-subjects-dir sourcedata/freesurfer --me-output-echos --bids-filter-file code/bids_filters.json --anat-only  ./sourcedata/bids ./ participant

What version of fMRIPrep are you running?

24.1.1

How are you running fMRIPrep?

Singularity

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

No

Please copy and paste any relevant log output.

No response

Additional information / screenshots

No response

effigies commented 1 week ago

Does "2" work? Just trying to figure out how much of a blocker this is.

PR welcome in any case, of course.

bpinsard commented 1 week ago

Works with number as string, so really not a blocker, I opened the issue so that if other gets that bug they know where it originates from and I will work on a PR when I find the time.

Also, this is a very experimental run, I was trying to boldly input mp2rage into sMRIPrep, it completes but with a few datasink errors, and it would require to transform the raw image to something that resembles more a T1w.