Fmriprep error (zero-size array to reduction operation minimum which has no identity)

Summary of what happened:

Hello all,
I am running fmriprep to preprocess an openneuro dataset. For most participants the pipeline works successfully. However, for 5 participants i get the following error message and it is not quite clear to me how to proceed. Has anyone encounter something similar before?
Thank you very much in advance

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

cmd="srun singularity run \
	--cleanenv \
	--bind ${DATA_DIRECTORY}:/data --bind ${LOCAL_FREESURFER_DIR}:/fsdir \
	/data/bids /data/bids/derivatives/fmriprep participant \
	--participant-label ${subject} \
	--work-dir /data/codes \
	--stop-on-first-crash \
	--write-graph \
	--fs-license-file /fsdir/license.txt --fs-subjects-dir /fsdir \
	--skip-bids-validation \



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


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

Relevant log outputs (up to 20 lines):

Node Name: fmriprep_23_2_wf.sub_S30_wf.bold_ses_2_task_BigBuckBunny_wf.bold_fit_wf.func_fit_reports_wf.epi_t1_report
File: /data/bids/derivatives/fmriprep/sub-S30/log/20240524-073803_95948696-19dc-409e-b5d2-2a6eedd5b4a4/crash-20240524-110242-anastasios.dadiotis-epi_t1_report-7245b5a6-0a13-4ac9-8e80-56a49787af38.txt
Working Directory: /data/codes/fmriprep_23_2_wf/sub_S30_wf/bold_ses_2_task_BigBuckBunny_wf/bold_fit_wf/func_fit_reports_wf/epi_t1_report
after_label: EPI
before_label: T1w
compress_report: auto
dismiss_affine: True
fixed_params: {}
moving_params: {}
out_report: report.svg
Traceback (most recent call last):
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/plugins/", line 67, in run_node
    result["result"] =
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/engine/", line 527, in run
    result = self._run_interface(execute=True)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/engine/", line 645, in _run_interface
    return self._run_command(execute)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/pipeline/engine/", line 771, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node epi_t1_report.

	Traceback (most recent call last):
	  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/numpy/ma/", line 6806, in min
	    return obj.min(axis=axis, fill_value=fill_value, out=out, **kwargs)
	AttributeError: 'list' object has no attribute 'min'

	During handling of the above exception, another exception occurred:

	Traceback (most recent call last):
	  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/interfaces/base/", line 398, in run
	    runtime = self._post_run_hook(runtime)
	  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nireports/interfaces/reporting/", line 239, in _post_run_hook
	    return super()._post_run_hook(runtime)
	  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nipype/interfaces/mixins/", line 50, in _post_run_hook
	  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nireports/interfaces/reporting/", line 105, in _generate_report
	  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nireports/reportlets/", line 169, in plot_registration
	    display.add_contours(contour, colors="r", levels=[0.5], linewidths=0.5)
	  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nilearn/plotting/displays/", line 367, in add_contours
	    self._map_show(img, type="contour", threshold=threshold, **kwargs)
	  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/nilearn/plotting/displays/", line 453, in _map_show
	    kwargs["vmin"] =
	  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/numpy/ma/", line 6810, in min
	    return asanyarray(obj).min(axis=axis, fill_value=fill_value,
	  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/numpy/ma/", line 5833, in min
	    result = self.filled(fill_value).min(
	  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/numpy/core/", line 45, in _amin
	    return umr_minimum(a, axis, None, out, keepdims, initial, where)
	ValueError: zero-size array to reduction operation minimum which has no identity

Screenshots / relevant information:

I tried increasing memory and it did not solve the issue.

Hi @anastasios and welcome to neurostars!

For future posts, please do not delete the prepopulated Software Support post template, which I added back in for you. It helps organize your post, prompts you for important information, and helps format the text for better readability. You can edit your post to add in this information so we can help you.


Hi @anastasios,

Thanks for adding the information. May you also please share the BIDS validation report? Also is this error subject-specific or do you see it across all subjects in your dataset?


Hi Steven,
Thank you very much for taking the time to reply. This error is the same with 5 specific subjects. For the rest of the subjects i did not get any error messages and i was able to finish fmriprep.
Regarding the BIDS validation report i am working with this dataset OpenNeuro and you can find the report to the link i am attaching.
Again thank you very much for your time,

Hi @anastasios,

Can you try rerunning problematic subjects with a fresh working directory? And do the image quality of the failing subjects look okay when viewed with an image viewer?


Hi @Steven,
I have tried deleting the fmriprep_23_2_wf subject specific files and rerunning the analysis but i got the same error message. I assume you mean running it in a completely fresh working directory?
And, yes the image quality of the failing subjects looks ok when viewed with an image viewer.

Hi @Steven,
I did what you proposed, running the analysis in a completely fresh directory, and unfortunately i got the exact error message. Is it safe to assume that the problem occurs during coregistration (Exception raised while executing Node epi_t1_report)? Would it make sense to disable freesurfer to see the results using FSL flirt and compare the results? Or if you have any suggestion, i would be very happy to try it.
Thank you in advance,
All best,