Skip to content

TypeError: 'Namespace' object does not support item assignment when using --longitudinal or --subject-anatomical-reference unbiased #573

Description

@joshita89

Describe the bug
Running sMRIPrep with either --longitudinal or --subject-anatomical-reference unbiased
crashes immediately at startup with:
Traceback (most recent call last):
File "/opt/conda/envs/smriprep/bin/smriprep", line 7, in
sys.exit(main())
File "/opt/conda/envs/smriprep/lib/python3.12/site-packages/smriprep/cli/run.py", line 37, in main
opts['longitudinal'] = True
TypeError: 'Namespace' object does not support item assignment

Also reproduced with --subject-anatomical-reference unbiased instead of --longitudinal — same crash, same line.

Version

Reproduced identically on 0.19.0, 0.19.1, and 0.19.2 (Singularity containers built from docker://nipreps/smriprep).

Exact command line executed
singularity run
--bind $bids_in,$bids_out,$work,$FREESURFER_HOME,$SINGULARITYENV_TEMPLATEFLOW_HOME
/path/to//smriprep-0.19.1.sif
$bids_in $bids_out participant
--participant-label 01
--subject-anatomical-reference unbiased
--fs-license-file $license
--output-spaces MNI152NLin2009cAsym:res-2 fsaverage5
--stop-on-first-crash
-w $work
--skull-strip-template OASIS30ANTs
--nprocs 48 --omp-nthreads 4 --mem-gb 350

Are you positive that the input dataset is BIDS-compliant?

  • I have used the online BIDS-Validator
  • I have run a local installation of the BIDS-Validator (please, note the version of the validator here).
  • [X ] I let sMRIPrep check it for me (in other words, I didn't set the --skip-bids-validation argument).
  • No, I haven't checked myself AND used the --skip-bids-validation argument.

sMRIPrep feedback information
Please attach the full log written to the standard output and the crashfile(s), if generated.

Visual reports of sMRIPrep
Traceback (most recent call last):
File "/opt/conda/envs/smriprep/bin/smriprep", line 7, in
sys.exit(main())
^^^^^^
File "/opt/conda/envs/smriprep/lib/python3.12/site-packages/smriprep/cli/run.py", line 37, in main
opts['longitudinal'] = True
~~~~^^^^^^^^^^^^^^^^
TypeError: 'Namespace' object does not support item assignment

Image

Installation type (please complete the following information):

  • "Bare-metal"
  • [X ] Singularity
  • Docker

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions