XCP-D 26.0.2 fails during brainsprite plot_slices_T1/T2

Summary of what happened:

I am running XCP-D 26.0.2 on fMRIPrep 25.2.5 derivatives from OASIS-3 using a Singularity/Apptainer image on an HPC cluster.

The workflow appears to proceed past the initial parsing and into the post-processing workflow, but it fails during generation of the surface/brainsprite visual report. The failing nodes are:

  • plot_slices_T1
  • plot_slices_T2

The error occurs inside matplotlib when XCP-D tries to create the figure for the anatomical slices:

TypeError: _warn() got an unexpected keyword argument ‘skip_file_prefixes’

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

singularity run --cleanenv ${image_path} \
  ${in_path} \
  ${out_path} \
  participant \
  --participant_label ${participant_id} \
  --clean-workdir \
  --mode linc \
  --input-type fmriprep \
  --file-format cifti \
  --smoothing 0 \
  --despike y \
  --lower-bpf 0.00 \
  --upper-bpf 0.08 \
  --nuisance-regressors acompcor \
  --dummy-scans auto \
  --fd-thresh 0.5 \
  --min-time 0 \
  --min-coverage 0.4 \
  --linc-qc y \
  --abcc-qc y \
  --motion-filter-type none \
  --output-type auto \
  --fs-license-file ${license_path} \
  --combine-runs y \
  --warp-surfaces-native2std n \
  --notrack \
  -w ${work_dir_path}

Relevant log outputs (up to 20 lines):

PASTE LOG OUTPUT HERE260519-16:32:51,421 nipype.workflow INFO:
	 [Node] Setting-up "_cifti_correlations_to_tsv15" in "/sing/work_dir/XCP_D_fc_reho_acompcor_censor_sub-xxx/xcp_d_26_0_wf/sub_OASxxx_ses__ses__wf/concatenate_entity_set_0_wf/cifti_correlations_to_tsv/mapflow/_cifti_correlations_to_tsv15".
260519-16:32:51,424 nipype.workflow INFO:
	 [Node] Cached "_cifti_correlations_to_tsv15" - collecting precomputed outputs
260519-16:32:51,424 nipype.workflow INFO:
	 [Node] "_cifti_correlations_to_tsv15" found cached.
260519-16:33:04,568 nipype.workflow ERROR:
	 could not run node: xcp_d_26_0_wf.sub_OASxxx_ses__ses__wf.postprocess_surfaces_wf.brainsprite_wf.plot_slices_T1
260519-16:33:04,568 nipype.workflow ERROR:
	 could not run node: xcp_d_26_0_wf.sub_OASxxx_ses__ses__wf.postprocess_surfaces_wf.brainsprite_wf.plot_slices_T2
260519-16:33:04,726 nipype.workflow CRITICAL:
	 XCP-D failed: 2 raised. Re-raising first.

Screenshots / relevant information:

The XCP-D environment inside the container appears to use Python 3.12, based on the traceback path:
/app/.pixi/envs/xcp-d/lib/python3.12/
Traceback:
File “/app/.pixi/envs/xcp-d/lib/python3.12/site-packages/xcp_d/interfaces/execsummary.py”, line 513, in _plot_single_slice
fig, ax = plt.subplots(figsize=(9, 7.5))
File “/app/.pixi/envs/xcp-d/lib/python3.12/site-packages/matplotlib/pyplot.py”, line 1776, in subplots
fig = figure(**fig_kw)
File “/app/.pixi/envs/xcp-d/lib/python3.12/site-packages/matplotlib/pyplot.py”, line 1032, in figure
_api.warn_external(
File “/app/.pixi/envs/xcp-d/lib/python3.12/site-packages/matplotlib/_api/init.py”, line 405, in warn_external
warnings.warn(message, category, **kwargs)
TypeError: _warn() got an unexpected keyword argument ‘skip_file_prefixes’


Thanks for reporting this. It looks like this was also encountered in fMRIPrep (see Recurring "unexpected keyword argument 'skip_file_prefixes'" Error · Issue #3478 · nipreps/fmriprep · GitHub ). I will port over their fix to XCP-D in the next day or two and make a new patch release.

1 Like

I released 26.0.3 with the fix. Please give that a try.