AttributeError: 'numpy.int64' object has no attribute 'value'

Dear all,

We keep receiving error messages like these in multiple nodes:

Traceback (most recent call last):
  File "/data/[REDACTED]/code/conda/lib/python3.7/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.7/site-packages/nipype/pipeline/engine/nodes.py", line 516, in run
    result = self._run_interface(execute=True)
  File "/data/[REDACTED]/code/conda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 635, in _run_interface
    return self._run_command(execute)
  File "/data/[REDACTED]/code/conda/lib/python3.7/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.7/site-packages/nipype/interfaces/base/core.py", line 435, in run
    runtime = self._post_run_hook(runtime)
  File "/data/[REDACTED]/code/conda/lib/python3.7/site-packages/niworkflows/interfaces/registration.py", line 357, in _post_run_hook
    return super(SimpleBeforeAfterRPT, self)._post_run_hook(runtime)
  File "/data/[REDACTED]/code/conda/lib/python3.7/site-packages/nipype/interfaces/mixins/reporting.py", line 50, in _post_run_hook
    self._generate_report()
  File "/data/[REDACTED]/code/conda/lib/python3.7/site-packages/niworkflows/interfaces/report_base.py", line 90, in _generate_report
    out_file=self._out_report,
  File "/data/[REDACTED]/code/conda/lib/python3.7/site-packages/niworkflows/viz/utils.py", line 350, in compose_view
    out_file.write_text("\n".join(_compose_view(bg_svgs, fg_svgs, ref=ref)))
  File "/data/[REDACTED]/code/conda/lib/python3.7/site-packages/niworkflows/viz/utils.py", line 381, in _compose_view
    fig = SVGFigure(width, heights[:nsvgs].sum())
  File "/data/[REDACTED]/code/conda/lib/python3.7/site-packages/svgutils/transform.py", line 242, in __init__
    self._width = width.value
AttributeError: 'numpy.int64' object has no attribute 'value'

They happen with both FMRIPREP 20.1.1 and 20.1.2, both with Python 3.7 and 3.8. We are using a conda (miniconda) environment, and FMRIPREP was installed via pip, along with all its dependencies; pip reported no errors; this is a fresh environment.

The call to FMRIPREP was:

/data/[REDACTED]/code/conda/bin/fmriprep /data/[REDACTED] /lscratch/6110749/s23568.out participant --participant_label s23568 -w /lscratch/6110749/s23568.wrk --use-aroma --notrack --output-space MNI152NLin2009cAsym:res-2 fsaverage --nthreads 1 --omp-nthreads 1 --skip_bids_validation

Thanks!

All the best,

Anderson

Hi @winkler - this can be fixed by downgrading svgutils to the previous release.

python -m pip install svgutils==0.3.1

Thanks, will give it a try.