MRIQC TypeError: 'reversed' is an invalid keyword argument for sort()

Summary of what happened:

I got an error when I submitted a slurm job:

Command used (and if a helper script was used, a link to the helper script or the command generated):

subjectID=$( sed -n -E "$((${SLURM_ARRAY_TASK_ID} + 1))s/sub-(\S*)\>.*/\1/gp" ${BIDS_DIR}/participants.tsv )
echo "$subjectID"

singularity run \
        --cleanenv \
        -B ${BIDS_DIR}:/data:ro \
        -B ${OUTPUT_DIR}:/output \
        -B ${WORK_DIR}:/work \
    ${MRIQC} /data /output \
    participant \
    --participant-label "$subjectID" \
    -w /work \
    -vv \
    --n_cpus 4 \
    --mem 16000 \
    --write-graph \
    --fd_thres 0.2 \
    --float32 \

Version:

23.1.1

Environment (Docker, Singularity / Apptainer, custom installation):

Docker

Data formatted according to a validatable standard? Please provide the output of the validator:

PASTE VALIDATOR OUTPUT HERE

Relevant log outputs (up to 20 lines):

Traceback (most recent call last):
  File "/opt/conda/lib/python3.11/site-packages/mriqc/engine/plugin.py", line 60, in run_node
    result['result'] = node.run(updatehash=updatehash)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
    result = self._run_interface(execute=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
    return self._run_command(execute)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node GradientThreshold.

Traceback:
	Traceback (most recent call last):
	  File "/opt/conda/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 397, in run
	    runtime = self._run_interface(runtime)
	              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	  File "/opt/conda/lib/python3.11/site-packages/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
	    out = function_handle(**args)
	          ^^^^^^^^^^^^^^^^^^^^^^^
	  File "<string>", line 44, in gradient_threshold
	TypeError: 'reversed' is an invalid keyword argument for sort()

Screenshots / relevant information:


(edit: info was added to original post)

Hi everyone,

I tried the latest verison nipreps/mriqc:24.0.0rc1 and it worked well.

1 Like