QSIRecon template_name set to None

Summary of what happened:

First time qsiprep/recon user here. For this reason I’m not sure this belongs here or as a git issue…so I start here. I am running more or less default qsiprep (1.0.1) with apptainer. It completes without error, and all output seems ok (at least according to what I’ve seen on readthedocs/here). I then try to run qsirecon (1.1.0) with the hbcd recon (using an abcd dwi & fm). However it keeps throwing an error related to the template.

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

apptainer run --no-mount hostfs --cleanenv --containall \
    -B ${bidsDir},${work},${subjdir},${TEMPLATEFLOW_HOME} \
    --env "TEMPLATEFLOW_HOME=$TEMPLATEFLOW_HOME" \
    --env "SUBJECTS_DIR=$subjdir" \
    qsiprep-1.0.1.sif \
    ${bidsDir} \
    ${bidsDir}/derivatives/dwi/qsiprep \
    participant \
    --output-resolution 1.7 \
    --fs-license-file \
    ${fsLicense} \
    --nprocs 190 \
    --omp-nthreads 20 \
    --participant-label sub-1115 \
    --skip-bids-validation \
    -w ${work} \
    --anatomical-template MNI152NLin2009cAsym

apptainer run --no-mount hostfs --cleanenv --containall \
    -B ${bidsDir},${work},${subjdir} \
    qsirecon-1.1.0.sif \
    ${bidsDir}/derivatives/dwi/qsiprep \
    ${bidsDir}/derivatives/dwi/qsirecon \
    participant \
    --fs-license-file ${fsLicense} \
    --nprocs 190 \
    --participant-label sub-1115 \
    -w ${work} \
    --recon-spec hbcd_scalar_maps \
    --fs-subjects-dir ${subjdir} \
    --output-resolution 1.7 \
    --input-type qsiprep \
    --debug all \
    -vvv

Version:

qsirecon: 1.0.1
qsiprep: 1.1.0

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

singularity/apptainer

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

I skip bids validation for now 

Relevant log outputs (up to 20 lines):

250626-23:45:19,922 nipype.workflow INFO:
	 Found 1 high-res anatomicals to process
Traceback (most recent call last):
  File "/opt/conda/envs/qsiprep/bin/qsirecon", line 8, in <module>
    sys.exit(main())
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/cli/run.py", line 84, in main
    retval = build_workflow(str(config_file), {})
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/cli/workflow.py", line 133, in 
build_workflow
    retval["workflow"] = init_qsirecon_wf()
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/workflows/base.py", line 44, in
 init_qsirecon_wf
    single_subject_wf = init_single_subject_recon_wf(subject_id=subject_id)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/workflows/base.py", line 246, i
n init_single_subject_recon_wf
    dwi_anat_wfs[dwi_file], dwi_available_anatomical_data = init_dwi_recon_anatomical_workflow(
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/workflows/recon/anatomical.py",
 line 406, in init_dwi_recon_anatomical_workflow
    GetTemplate(
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 56
7, in __init__
    super().__init__(
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 20
4, in __init__
    self.inputs.trait_set(**inputs)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/traits/has_traits.py", line 1520, in tra
it_set
    setattr(self, name, value)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/traits/base_trait_handler.py", line 74, 
in error
    raise TraitError(
traits.trait_errors.TraitError: The 'template_name' trait of a _GetTemplateInputSpec instance must be
 a string, but a value of None <class 'NoneType'> was specified.

Screenshots / relevant information:

I have tried with several other (built-in) recon options, but they all give the same error. My apologies if I’m missing something very simple here.


Hi @muet0005 and welcome to neurostars!

May you please return the tree output of a subject’s qsiprep folder? E.g., ${bidsDir}/derivatives/dwi/qsiprep/sub-1115.

Best,
Steven

Dear Steven,
Thank you for the very quick reply! See the image here, I hope this is sufficient?

Another note: I just noticed:
Apptainer> qsiprep --version
QSIPrep v1.0.2.dev0+gfc89945.d20250405
Apptainer>

Despite using this to build the container:
apptainer build qsiprep-1.0.1.sif docker://pennlinc/qsiprep:1.0.1

The same goes for qsiprep, I requested 1.1.0 via the apptainer build, but get this:
Apptainer> qsirecon --version
QSIRecon v1.1.1.dev0+gaf43da9.d20250414
Apptainer>

hi @muet0005, you need to specify an --output-space argument if you’re using hbcd_scalar_maps. In your case it will have to be MNI152Nlin2009cAsym

Thanks for the fast reply @mattcieslak!

I indeed gave that a try, in a few ways (e.g., --output-space, and with the same command from qsiprep), but these flags are not recognized in qsirecon:

e.g,
qsirecon: error: unrecognized arguments: --output-space MNI152Nlin2009cAsym

I also saw the same error with other recons, not just the hbcd flavor.

I just had a look in qsirecon/cli/parser.py…lines ~443-447 (initialize --output-space if not defined) are commented out which maybe explains why if nothing is passed it fails. However, I do not see any other explicit references to --output-space…

let me know if there are other things I should try.

All the best,

Just checking back in here.

I made sure the data are all up to bids spec, and now the bids-validation is not skipped. No change.

I have also been testing making a few changes in your code, namely adding a few things to “parser”. This did not help.

Would the next logical place to adapt be config.py?

@muet0005 Sorry for the delay. Have you tried running QSIPrep with --anatomical-template MNI152NLin2009cAsym and then following that with QSIRecen without --output-spaces (which, as you mentioned, isn’t a supported parameter yet)?

@tsalo thanks for this suggestion. This is actually how I originally ran.

I did recently wipe the work and derivative folders completely and re run qsiprep in the event some kind of cache was interfering, but this didn’t help.

I have also tested on several different datasets, but each time I get the same errror.

Very much open to other ideas/suggestions to try.

That’s unfortunate… Any chance you can share the tree output for a single failing subject from your QSIPrep and QSIRecon runs?

Hi @tsalo QSIPREP behaves the same on all datasets I try (single and multishell). It completes, seemingly without error. See tree output in previous post for an example. QSIRECON creates an empty “logs” folder and that’s it…

Ah sorry I missed that. I think I understand the problem, but just to be sure- there should be a bit in your log file that starts “Anatomical data available for”. Can you paste that section here?

Dear @tsalo , thanks for sticking with me here, and for the help. Indeed, the log for the anatomical data was confusing me as well. it seems to be iterative (it updates and changes as the process progresses). However, at least for the freesurfer output, it sets most fields to null/none.

250630-12:00:24,866 nipype.workflow IMPORTANT:
	 Building QSIRecon's workflow:
           * BIDS dataset path: /gpfs/nvme1/0/genr/GenR_MRI/bids.upgrade/derivatives/dwi/qsiprep.
           * Participant list: ['1195'].
           * Run identifier: 20250630-120021_51837681-484b-4cf9-a087-fb5d1e4ba9e9.
           * Pre-run FreeSurfer's SUBJECTS_DIR: /gpfs/nvme1/0/genr/software/qsiprep/freesurfer.
250630-12:00:27,817 nipype.utils INFO:
	 Collected anatomical data:
acpc_aparc: null
acpc_aseg: null
acpc_brain_mask: null
acpc_csf_probseg: null
acpc_gm_probseg: null
acpc_preproc: null
acpc_seg: null
acpc_to_template_xfm: null
acpc_wm_probseg: null
orig_to_acpc_xfm: null
template_to_acpc_xfm: null

250630-12:00:27,818 nipype.utils WARNING:
	 No preprocessed anatomical image or brain mask found.
250630-12:00:27,818 nipype.utils WARNING:
	 No anat-to-template or template-to-anat transforms found.
250630-12:00:27,819 nipype.workflow INFO:
	 Anatomical data available for /gpfs/nvme1/0/genr/GenR_MRI/bids.upgrade/derivatives/dwi/qsiprep/sub-1195/anat/sub-1195_space-ACPC_desc-preproc_T1w.nii.gz:
acpc_aparc: null
acpc_aseg: null
acpc_brain_mask: null
acpc_csf_probseg: null
acpc_gm_probseg: null
acpc_preproc: null
acpc_seg: null
acpc_to_template_xfm: null
acpc_wm_probseg: null
orig_to_acpc_xfm: null
template_to_acpc_xfm: null

250630-12:00:27,823 nipype.workflow INFO:
	 Found high-res anatomical data in preprocessed inputs for 1195.
250630-12:00:27,823 nipype.workflow DEBUG:
	 (recon_anatomical_wf_0.inputnode, recon_anatomical_wf_0.outputnode): No edge data
250630-12:00:27,824 nipype.workflow DEBUG:
	 (recon_anatomical_wf_0.inputnode, recon_anatomical_wf_0.outputnode): new edge data: {'connect': [('acpc_aparc', 'acpc_aparc'), ('acpc_seg', 'acpc_seg'), ('acpc_aseg', 'acpc_aseg'), ('acpc_brain_mask', 'acpc_brain_mask'), ('acpc_preproc', 'acpc_preproc'), ('acpc_csf_probseg', 'acpc_csf_probseg'), ('acpc_gm_probseg', 'acpc_gm_probseg'), ('acpc_wm_probseg', 'acpc_wm_probseg'), ('orig_to_acpc_xfm', 'orig_to_acpc_xfm'), ('template_to_acpc_xfm', 'template_to_acpc_xfm'), ('acpc_to_template_xfm', 'acpc_to_template_xfm')]}
250630-12:00:27,824 nipype.workflow INFO:
	 Freesurfer directory /gpfs/nvme1/0/genr/software/qsiprep/freesurfer/sub-1195 exists for 1195
250630-12:00:27,824 nipype.workflow INFO:
	 acpc_aparc (<class 'str'>): None (<class 'NoneType'>)
250630-12:00:27,824 nipype.workflow DEBUG:
	 [Node] anat_ingress_node_0 - setting input acpc_aparc = None

I assumed the template error was most relevant…I probably should have sent you this output sooner…

Let me know if you see the issue more clearly now.
thanks again, All the best,

Okay, perfect thank you. I have opened a PR that should fix the problem. I may ask you to test out the fixed version before we make a patch release, just to ensure that my changes solve the entire issue.

thank you! just let me know and I can give it a test.

Can you try pulling the updated pennlinc/qsirecon:unstable Docker image and re-running your job?

Hi @tsalo. Thank you for this. I’ve re-built the singularity image (it seems to have pulled your changes…I did a “diff” on base.py from each). I get the same error, this time the full output:

250714-21:53:32,917 nipype.workflow IMPORTANT:
	 Running QSIRecon version 1.1.1.dev7+g7e2d198.d20250714

         License NOTICE ##################################################
         QSIRecon 1.1.1.dev7+g7e2d198.d20250714
         Copyright The PennLINC Developers.
         
         This product includes software developed by
         the NiPreps Community (https://nipreps.org/).
         
         Portions of this software were developed at the Department of
         Psychology at Stanford University, Stanford, CA, US.
         
         This software is also distributed as a Docker container image.
         The bootstrapping file for the image ("Dockerfile") is licensed
         under the MIT License.
         
         This software may be distributed through an add-on package called
         "Docker Wrapper" that is under the BSD 3-clause License.
         #################################################################
250714-21:53:32,929 nipype.workflow IMPORTANT:
	 Building QSIRecon's workflow:
           * BIDS dataset path: /gpfs/nvme1/0/genr/GenR_MRI/bids.upgrade/derivatives/dwi/qsiprep.
           * Participant list: ['1115'].
           * Run identifier: 20250714-215329_cf320a1d-1776-4912-bb32-e08c6e1ad392.
           * Pre-run FreeSurfer's SUBJECTS_DIR: /gpfs/nvme1/0/genr/software/qsiprep/freesurfer.
250714-21:53:36,311 nipype.utils INFO:
	 Collected anatomical data:
acpc_aparc: null
acpc_aseg: null
acpc_brain_mask: null
acpc_csf_probseg: null
acpc_gm_probseg: null
acpc_preproc: null
acpc_seg: null
acpc_to_template_xfm: null
acpc_wm_probseg: null
orig_to_acpc_xfm: null
template_to_acpc_xfm: null

250714-21:53:36,313 nipype.utils WARNING:
	 No preprocessed anatomical image or brain mask found.
250714-21:53:36,313 nipype.utils WARNING:
	 No anat-to-template or template-to-anat transforms found.
250714-21:53:36,314 nipype.workflow INFO:
	 Anatomical data available for /gpfs/nvme1/0/genr/GenR_MRI/bids.upgrade/derivatives/dwi/qsiprep/sub-1115/anat/sub-1115_space-ACPC_desc-preproc_T1w.nii.gz:
acpc_aparc: null
acpc_aseg: null
acpc_brain_mask: null
acpc_csf_probseg: null
acpc_gm_probseg: null
acpc_preproc: null
acpc_seg: null
acpc_to_template_xfm: null
acpc_wm_probseg: null
orig_to_acpc_xfm: null
template_to_acpc_xfm: null

250714-21:53:36,317 nipype.workflow INFO:
	 Found high-res anatomical data in preprocessed inputs for 1115.
250714-21:53:36,317 nipype.workflow DEBUG:
	 (recon_anatomical_wf_0.inputnode, recon_anatomical_wf_0.outputnode): No edge data
250714-21:53:36,317 nipype.workflow DEBUG:
	 (recon_anatomical_wf_0.inputnode, recon_anatomical_wf_0.outputnode): new edge data: {'connect': [('acpc_aparc', 'acpc_aparc'), ('acpc_seg', 'acpc_seg'), ('acpc_aseg', 'acpc_aseg'), ('acpc_brain_mask', 'acpc_brain_mask'), ('acpc_preproc', 'acpc_preproc'), ('acpc_csf_probseg', 'acpc_csf_probseg'), ('acpc_gm_probseg', 'acpc_gm_probseg'), ('acpc_wm_probseg', 'acpc_wm_probseg'), ('orig_to_acpc_xfm', 'orig_to_acpc_xfm'), ('template_to_acpc_xfm', 'template_to_acpc_xfm'), ('acpc_to_template_xfm', 'acpc_to_template_xfm')]}
250714-21:53:36,317 nipype.workflow INFO:
	 Freesurfer directory /gpfs/nvme1/0/genr/software/qsiprep/freesurfer/sub-1115 exists for 1115
250714-21:53:36,317 nipype.workflow INFO:
	 acpc_aparc (<class 'str'>): None (<class 'NoneType'>)
250714-21:53:36,317 nipype.workflow DEBUG:
	 [Node] anat_ingress_node_0 - setting input acpc_aparc = None
250714-21:53:36,317 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): No edge data
250714-21:53:36,317 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): new edge data: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc')]}
250714-21:53:36,317 nipype.workflow INFO:
	 acpc_seg (<class 'str'>): None (<class 'NoneType'>)
250714-21:53:36,318 nipype.workflow DEBUG:
	 [Node] anat_ingress_node_0 - setting input acpc_seg = None
250714-21:53:36,318 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): Edge data exists: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc')]}
250714-21:53:36,318 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): new edge data: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg')]}
250714-21:53:36,318 nipype.workflow INFO:
	 acpc_aseg (<class 'str'>): None (<class 'NoneType'>)
250714-21:53:36,318 nipype.workflow DEBUG:
	 [Node] anat_ingress_node_0 - setting input acpc_aseg = None
250714-21:53:36,318 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): Edge data exists: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg')]}
250714-21:53:36,318 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): new edge data: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg'), ('acpc_aseg', 'inputnode.acpc_aseg')]}
250714-21:53:36,318 nipype.workflow INFO:
	 acpc_brain_mask (<class 'str'>): None (<class 'NoneType'>)
250714-21:53:36,318 nipype.workflow DEBUG:
	 [Node] anat_ingress_node_0 - setting input acpc_brain_mask = None
250714-21:53:36,318 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): Edge data exists: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg'), ('acpc_aseg', 'inputnode.acpc_aseg')]}
250714-21:53:36,318 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): new edge data: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg'), ('acpc_aseg', 'inputnode.acpc_aseg'), ('acpc_brain_mask', 'inputnode.acpc_brain_mask')]}
250714-21:53:36,318 nipype.workflow INFO:
	 acpc_preproc (<class 'str'>): None (<class 'NoneType'>)
250714-21:53:36,318 nipype.workflow DEBUG:
	 [Node] anat_ingress_node_0 - setting input acpc_preproc = None
250714-21:53:36,318 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): Edge data exists: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg'), ('acpc_aseg', 'inputnode.acpc_aseg'), ('acpc_brain_mask', 'inputnode.acpc_brain_mask')]}
250714-21:53:36,318 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): new edge data: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg'), ('acpc_aseg', 'inputnode.acpc_aseg'), ('acpc_brain_mask', 'inputnode.acpc_brain_mask'), ('acpc_preproc', 'inputnode.acpc_preproc')]}
250714-21:53:36,318 nipype.workflow INFO:
	 acpc_csf_probseg (<class 'str'>): None (<class 'NoneType'>)
250714-21:53:36,318 nipype.workflow DEBUG:
	 [Node] anat_ingress_node_0 - setting input acpc_csf_probseg = None
250714-21:53:36,318 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): Edge data exists: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg'), ('acpc_aseg', 'inputnode.acpc_aseg'), ('acpc_brain_mask', 'inputnode.acpc_brain_mask'), ('acpc_preproc', 'inputnode.acpc_preproc')]}
250714-21:53:36,318 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): new edge data: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg'), ('acpc_aseg', 'inputnode.acpc_aseg'), ('acpc_brain_mask', 'inputnode.acpc_brain_mask'), ('acpc_preproc', 'inputnode.acpc_preproc'), ('acpc_csf_probseg', 'inputnode.acpc_csf_probseg')]}
250714-21:53:36,318 nipype.workflow INFO:
	 acpc_gm_probseg (<class 'str'>): None (<class 'NoneType'>)
250714-21:53:36,318 nipype.workflow DEBUG:
	 [Node] anat_ingress_node_0 - setting input acpc_gm_probseg = None
250714-21:53:36,318 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): Edge data exists: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg'), ('acpc_aseg', 'inputnode.acpc_aseg'), ('acpc_brain_mask', 'inputnode.acpc_brain_mask'), ('acpc_preproc', 'inputnode.acpc_preproc'), ('acpc_csf_probseg', 'inputnode.acpc_csf_probseg')]}
250714-21:53:36,319 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): new edge data: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg'), ('acpc_aseg', 'inputnode.acpc_aseg'), ('acpc_brain_mask', 'inputnode.acpc_brain_mask'), ('acpc_preproc', 'inputnode.acpc_preproc'), ('acpc_csf_probseg', 'inputnode.acpc_csf_probseg'), ('acpc_gm_probseg', 'inputnode.acpc_gm_probseg')]}
250714-21:53:36,319 nipype.workflow INFO:
	 acpc_wm_probseg (<class 'str'>): None (<class 'NoneType'>)
250714-21:53:36,319 nipype.workflow DEBUG:
	 [Node] anat_ingress_node_0 - setting input acpc_wm_probseg = None
250714-21:53:36,319 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): Edge data exists: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg'), ('acpc_aseg', 'inputnode.acpc_aseg'), ('acpc_brain_mask', 'inputnode.acpc_brain_mask'), ('acpc_preproc', 'inputnode.acpc_preproc'), ('acpc_csf_probseg', 'inputnode.acpc_csf_probseg'), ('acpc_gm_probseg', 'inputnode.acpc_gm_probseg')]}
250714-21:53:36,319 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): new edge data: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg'), ('acpc_aseg', 'inputnode.acpc_aseg'), ('acpc_brain_mask', 'inputnode.acpc_brain_mask'), ('acpc_preproc', 'inputnode.acpc_preproc'), ('acpc_csf_probseg', 'inputnode.acpc_csf_probseg'), ('acpc_gm_probseg', 'inputnode.acpc_gm_probseg'), ('acpc_wm_probseg', 'inputnode.acpc_wm_probseg')]}
250714-21:53:36,319 nipype.workflow INFO:
	 orig_to_acpc_xfm (<class 'str'>): None (<class 'NoneType'>)
250714-21:53:36,319 nipype.workflow DEBUG:
	 [Node] anat_ingress_node_0 - setting input orig_to_acpc_xfm = None
250714-21:53:36,319 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): Edge data exists: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg'), ('acpc_aseg', 'inputnode.acpc_aseg'), ('acpc_brain_mask', 'inputnode.acpc_brain_mask'), ('acpc_preproc', 'inputnode.acpc_preproc'), ('acpc_csf_probseg', 'inputnode.acpc_csf_probseg'), ('acpc_gm_probseg', 'inputnode.acpc_gm_probseg'), ('acpc_wm_probseg', 'inputnode.acpc_wm_probseg')]}
250714-21:53:36,319 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): new edge data: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg'), ('acpc_aseg', 'inputnode.acpc_aseg'), ('acpc_brain_mask', 'inputnode.acpc_brain_mask'), ('acpc_preproc', 'inputnode.acpc_preproc'), ('acpc_csf_probseg', 'inputnode.acpc_csf_probseg'), ('acpc_gm_probseg', 'inputnode.acpc_gm_probseg'), ('acpc_wm_probseg', 'inputnode.acpc_wm_probseg'), ('orig_to_acpc_xfm', 'inputnode.orig_to_acpc_xfm')]}
250714-21:53:36,319 nipype.workflow INFO:
	 template_to_acpc_xfm (<class 'str'>): None (<class 'NoneType'>)
250714-21:53:36,319 nipype.workflow DEBUG:
	 [Node] anat_ingress_node_0 - setting input template_to_acpc_xfm = None
250714-21:53:36,319 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): Edge data exists: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg'), ('acpc_aseg', 'inputnode.acpc_aseg'), ('acpc_brain_mask', 'inputnode.acpc_brain_mask'), ('acpc_preproc', 'inputnode.acpc_preproc'), ('acpc_csf_probseg', 'inputnode.acpc_csf_probseg'), ('acpc_gm_probseg', 'inputnode.acpc_gm_probseg'), ('acpc_wm_probseg', 'inputnode.acpc_wm_probseg'), ('orig_to_acpc_xfm', 'inputnode.orig_to_acpc_xfm')]}
250714-21:53:36,319 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): new edge data: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg'), ('acpc_aseg', 'inputnode.acpc_aseg'), ('acpc_brain_mask', 'inputnode.acpc_brain_mask'), ('acpc_preproc', 'inputnode.acpc_preproc'), ('acpc_csf_probseg', 'inputnode.acpc_csf_probseg'), ('acpc_gm_probseg', 'inputnode.acpc_gm_probseg'), ('acpc_wm_probseg', 'inputnode.acpc_wm_probseg'), ('orig_to_acpc_xfm', 'inputnode.orig_to_acpc_xfm'), ('template_to_acpc_xfm', 'inputnode.template_to_acpc_xfm')]}
250714-21:53:36,319 nipype.workflow INFO:
	 acpc_to_template_xfm (<class 'str'>): None (<class 'NoneType'>)
250714-21:53:36,319 nipype.workflow DEBUG:
	 [Node] anat_ingress_node_0 - setting input acpc_to_template_xfm = None
250714-21:53:36,319 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): Edge data exists: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg'), ('acpc_aseg', 'inputnode.acpc_aseg'), ('acpc_brain_mask', 'inputnode.acpc_brain_mask'), ('acpc_preproc', 'inputnode.acpc_preproc'), ('acpc_csf_probseg', 'inputnode.acpc_csf_probseg'), ('acpc_gm_probseg', 'inputnode.acpc_gm_probseg'), ('acpc_wm_probseg', 'inputnode.acpc_wm_probseg'), ('orig_to_acpc_xfm', 'inputnode.orig_to_acpc_xfm'), ('template_to_acpc_xfm', 'inputnode.template_to_acpc_xfm')]}
250714-21:53:36,319 nipype.workflow DEBUG:
	 (sub-1115_hbcd_postproc_beta.anat_ingress_node_0, sub-1115_hbcd_postproc_beta.recon_anatomical_wf_0): new edge data: {'connect': [('acpc_aparc', 'inputnode.acpc_aparc'), ('acpc_seg', 'inputnode.acpc_seg'), ('acpc_aseg', 'inputnode.acpc_aseg'), ('acpc_brain_mask', 'inputnode.acpc_brain_mask'), ('acpc_preproc', 'inputnode.acpc_preproc'), ('acpc_csf_probseg', 'inputnode.acpc_csf_probseg'), ('acpc_gm_probseg', 'inputnode.acpc_gm_probseg'), ('acpc_wm_probseg', 'inputnode.acpc_wm_probseg'), ('orig_to_acpc_xfm', 'inputnode.orig_to_acpc_xfm'), ('template_to_acpc_xfm', 'inputnode.template_to_acpc_xfm'), ('acpc_to_template_xfm', 'inputnode.acpc_to_template_xfm')]}
250714-21:53:36,319 nipype.workflow INFO:
	 Found 1 high-res anatomicals to process
Traceback (most recent call last):
  File "/opt/conda/envs/qsiprep/bin/qsirecon", line 8, in <module>
    sys.exit(main())
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/cli/run.py", line 84, in main
    retval = build_workflow(str(config_file), {})
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/cli/workflow.py", line 133, in build_workflow
    retval["workflow"] = init_qsirecon_wf()
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/workflows/base.py", line 44, in init_qsirecon_wf
    single_subject_wf = init_single_subject_recon_wf(subject_id=subject_id)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/workflows/base.py", line 251, in init_single_subject_recon_wf
    dwi_anat_wfs[dwi_file], dwi_available_anatomical_data = init_dwi_recon_anatomical_workflow(
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/workflows/recon/anatomical.py", line 406, in init_dwi_recon_anatomical_workflow
    GetTemplate(
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 567, in __init__
    super().__init__(
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 204, in __init__
    self.inputs.trait_set(**inputs)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/traits/has_traits.py", line 1520, in trait_set
    setattr(self, name, value)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/traits/base_trait_handler.py", line 74, in error
    raise TraitError(
traits.trait_errors.TraitError: The 'template_name' trait of a _GetTemplateInputSpec instance must be a string, but a value of None <class 'NoneType'> was specified.

Thanks again for thinking along here. Let me know if you have other advice on something else I can try.

I wonder if you have a test dataset I could try?

Also, are there any special requirements on the freesurfer side? I have data processed through v6.0.0. The files are stored as ‘sub-ID’ and I’ve also tried ‘sub-ID_ses-ID’

Let me know!

I think the problem is occurring before Freesurfer comes into play, but my attempts to replicate the issue based on your file tree aren’t working.

You can test out QSIRecon on our test datasets (see qsirecon/qsirecon/tests/utils.py at 7e2d198f689dfeace314f2cd0daa826564bfecdf · PennLINC/qsirecon · GitHub).

Any chance you can share your failing subject’s data, so I can test it locally? You could upload to Box or Google Drive and then DM me the link.

Thanks @tsalo! I’ve downloaded the test data. I noticed a few differences in how qsiprep stored some of the outputs with our data here. I manually made the changes (all folders inside the session folder), but qsirecon still failed.

I’ve added you to a github repo which has a download link for a test dataset (t1, dwi, and fmap, ABCD-study acquisition on a GE system, converted with dcm2niix). It’s not the same dataset I’ve been testing within this thread here (I don’t have permission to share that one), but it’s the same scan sequences, bids setup, etc etc. so it should be a good example. I’m running qsiprep myself on it now. Let me know if you have trouble downloading.

Once you have these data run through QSIPrep, can you upload it as well so I can test with that?