FMRIPREP: TypeError: moveto() got an unexpected keyword argument ‘scale’

FMRIPREP (latest version, 20.2.1, installed in a fresh conda environment, using pip, not the container version) is crashing for all our participants with the error below. Any idea? Thanks!

Node Name: fmriprep_wf.single_subject_s22567_wf.func_preproc_task_AP2_run_1_wf.bold_reg_wf.bbreg_wf.mri_coreg

File: /lscratch/8869644/s22567.out/fmriprep/sub-s22567/log/20210221-212531_0d105933-b5e7-4c34-aa71-8d7178458565/crash-20210222-200439-winkleram-mri_coreg-a75bf407-27f1-4e20-b193-3cc36b8f77b9.txt
Working Directory: /lscratch/8869644/s22567.wrk/fmriprep_wf/single_subject_s22567_wf/func_preproc_task_AP2_run_1_wf/bold_reg_wf/bbreg_wf/mri_coreg
Inputs:

args:
brute_force_limit:
brute_force_samples:
compress_report: auto
conform_reference:
dof: 6
environ: {'SUBJECTS_DIR': '/usr/local/apps/freesurfer/6.0.0/subjects'}
ftol: 0.0001
initial_rotation:
initial_scale:
initial_shear:
initial_translation:
linmintol: 0.01
max_iters:
no_brute_force:
no_coord_dithering:
no_cras0:
no_intensity_dithering:
no_smooth:
num_threads: 1
out_lta_file: True
out_params_file:
out_reg_file:
out_report: report.svg
ref_fwhm:
reference_file:
reference_mask:
saturation_threshold:
sep: [4]
source_file:
source_mask:
source_oob:
subject_id:
subjects_dir: /usr/local/apps/freesurfer/6.0.0/subjects

Traceback (most recent call last):
File “/data/[redacted]/code/conda/lib/python3.8/site-packages/nipype/pipeline/plugins/multiproc.py”, line 67, in run_node
result[“result”] = node.run(updatehash=updatehash)
File “/data/[redacted]/code/conda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py”, line 516, in run
result = self._run_interface(execute=True)
File “/data/[redacted]/code/conda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py”, line 635, in _run_interface
return self._run_command(execute)
File “/data/[redacted]/code/conda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py”, line 741, in _run_command
result = self._interface.run(cwd=outdir)
File “/data/[redacted]/code/conda/lib/python3.8/site-packages/nipype/interfaces/freesurfer/base.py”, line 149, in run
return super(FSCommand, self).run(**inputs)
File “/data/[redacted]/code/conda/lib/python3.8/site-packages/nipype/interfaces/base/core.py”, line 435, in run
runtime = self._post_run_hook(runtime)
File “/data/[redacted]/code/conda/lib/python3.8/site-packages/niworkflows/interfaces/freesurfer.py”, line 230, in _post_run_hook
runtime = super(TruncateLTA, self)._post_run_hook(runtime)
File “/data/[redacted]/code/conda/lib/python3.8/site-packages/niworkflows/interfaces/registration.py”, line 331, in _post_run_hook
return super(MRICoregRPT, self)._post_run_hook(runtime)
File “/data/[redacted]/code/conda/lib/python3.8/site-packages/nipype/interfaces/mixins/reporting.py”, line 50, in _post_run_hook
self._generate_report()
File “/data/[redacted]/code/conda/lib/python3.8/site-packages/niworkflows/interfaces/report_base.py”, line 71, in _generate_report
compose_view(
File “/data/[redacted]/code/conda/lib/python3.8/site-packages/niworkflows/viz/utils.py”, line 361, in compose_view
out_file.write_text("\n".join(_compose_view(bg_svgs, fg_svgs, ref=ref)))
File “/data/[redacted]/code/conda/lib/python3.8/site-packages/niworkflows/viz/utils.py”, line 396, in _compose_view
r.moveto(0, yoffset, scale=scales[i])
TypeError: moveto() got an unexpected keyword argument ‘scale’

In the latest version of svgutils, they changed the input of “moveto” function from “scale” to “scale_x” and “scale_y”. You can either downgrade your svgutils version or simply modify “r.moveto(0, yoffset, scale=scales[i])” to “r.moveto(0, yoffset, scale_x=scales[i])”

1 Like