Some QSIRecon runs failing without error messages!? :(

Hi neurostars friends (and especially probably hi Steven, lol)!!

First and foremost, I genuinely and sincerely apologize if this is a stupid error or I completely missed something in a read the docs site or another neurostars post or something. Also I apologize if I formatted something incorrectly/not standard. Anyway, I’m hoping someone might have some thoughts and might be able to help me! Also if you need any more information please let me know.

Summary of what happened:

I have N=12 typically developing adults, with 2 MRI sessions per person (pre and post intervention) - 24 total. I have, among other images, a T1, a multishell (30 directions at b=1000 and 60 directions at b=2000) DW image, and a reverse phase encoded image (PA direction? original image is AP direction?) for each MRI session. I ran QSIprep version 1.0.0 on all of them, and got no error messages, all the expected outputs, and the .html files in the qsiprep outputs folder look as expected. So 24/24 success. I then ran QSIrecon version 1.0.0 (using recon spec pyAFQ specifically – but a slightly edited yaml, to get RD and AD in addition to the defaults FA and MD) on all of them, and got no error messages (all of the html files say everything ran successfully!), but did not get all the expected outputs. Some participants (16/24) successfully created and populated both the /derivatives/…/figures/ and /derivatives/…/dwi/, but many (8/24, which feels like a lot?!) only have /derivatives/…/figures/ and no /derivatives/…/dwi/. But again there are no error messages!? So I’m not sure what happened. Again, I genuinely and sincerely apologize if this is a stupid question or I missed something somewhere.

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

Looking at the QSIrecon html file for one MRI session from one participant, sub-261269, this is the command used:
QSIPrep:

/opt/conda/envs/qsiprep/bin/qsiprep /data /output participant --participant-label sub-261269 -w /work --fs-license-file /resources/license.txt --output-resolution 1.0

But I actually ran all 24 participants at once using this slurm script:

#!/bin/bash
#SBATCH --mail-user=<emily.m.harriott@vanderbilt.edu>
#SBATCH --mail-type=ALL
#SBATCH --nodes=1
#SBATCH --cpus-per-task=4
#SBATCH --mem-per-cpu=32G
#SBATCH --time=24:00:00
#SBATCH --output=/data/cutting_lab/users/harrioem/tms_summer2025/logs/qsiprep_%A_%a.log
#SBATCH --error=/data/cutting_lab/users/harrioem/tms_summer2025/logs/qsiprep_%A_%a.err
#SBATCH --array=1-24

# Parameters
participants=(sub-261814 sub-161741 sub-261729 sub-261711 sub-161147 sub-161231 sub-161323 sub-161512 sub-261103 sub-261126 sub-261190 sub-261195 sub-261234 sub-261269 sub-261283 sub-261325 sub-261382 sub-261414 sub-261421 sub-261422 sub-261441 sub-261497 sub-261501 sub-261571)
PARTICIPANT_LABEL=${participants[(${SLURM_ARRAY_TASK_ID} - 1)]}
BIDS_DIR=/data/cutting_lab/users/harrioem/tms_summer2025/qsiprep_input/
OUTPUT_DIR=/data/cutting_lab/users/harrioem/tms_summer2025/qsiprep_output/
WORK_DIR=/data/cutting_lab/users/harrioem/tms_summer2025/qsiprep_workdir/
QSIPREP_RESOURCES_PATH=/data/cutting_lab/users/harrioem/QSIprep/admin/

echo "array id: " ${SLURM_ARRAY_TASK_ID} "subject id: " ${PARTICIPANT_LABEL}

singularity run \
                --cleanenv \
                -B ${QSIPREP_RESOURCES_PATH}:/resources \
                -B ${BIDS_DIR}:/data \
                -B ${WORK_DIR}:/work \
                -B ${OUTPUT_DIR}:/output \
        /panfs/accrepfs.vampire/data/cutting_lab/users/harrioem/QSIprep/qsiprep_latest.sif \
	/data /output \
        participant --participant-label $PARTICIPANT_LABEL \
        -w /work \
        --fs-license-file /resources/license.txt \
        --output-resolution 1.0 \

QSIRecon:

/opt/conda/envs/qsiprep/bin/qsirecon /data /output participant --participant-label sub-261269 -w /work --fs-license-file /resources/license.txt --recon-spec /resources/pyafq_tractometry_edit.yaml --output-resolution 1.0 --skip-odf-reports --input-type qsiprep

But I actually ran all 24 participants at once using this slurm script:

#!/bin/bash
#SBATCH --mail-user=<emily.m.harriott@vanderbilt.edu>
#SBATCH --mail-type=ALL
#SBATCH --nodes=1
#SBATCH --cpus-per-task=4
#SBATCH --mem-per-cpu=32G
#SBATCH --time=24:00:00
#SBATCH --output=/data/cutting_lab/users/harrioem/tms_summer2025/logs/qsiprep_%A_%a.log
#SBATCH --error=/data/cutting_lab/users/harrioem/tms_summer2025/logs/qsiprep_%A_%a.err
#SBATCH --array=1-24

# Parameters
participants=(sub-261814 sub-161741 sub-261729 sub-261711 sub-161147 sub-161231 sub-161323 sub-161512 sub-261103 sub-261126 sub-261190 sub-261195 sub-261234 sub-261269 sub-261283 sub-261325 sub-261382 sub-261414 sub-261421 sub-261422 sub-261441 sub-261497 sub-261501 sub-261571)
PARTICIPANT_LABEL=${participants[(${SLURM_ARRAY_TASK_ID} - 1)]}
INPUTS=/data/cutting_lab/users/harrioem/tms_summer2025/qsiprep_output/
RESULTS=/data/cutting_lab/users/harrioem/tms_summer2025/qsirecon_output/
WORK_DIR=/data/cutting_lab/users/harrioem/tms_summer2025/qsirecon_workdir/
QSIPREP_RESOURCES_PATH=/data/cutting_lab/users/harrioem/QSIprep/admin/

echo "array id: " ${SLURM_ARRAY_TASK_ID} "subject id: " ${PARTICIPANT_LABEL}

singularity run \
                --cleanenv \
                -B ${QSIPREP_RESOURCES_PATH}:/resources \
                -B ${INPUTS}:/data \
                -B ${WORK_DIR}:/work \
                -B ${RESULTS}:/output \
        /panfs/accrepfs.vampire/data/cutting_lab/users/harrioem/QSIprep/qsirecon_latest.sif \
	/data /output \
        participant --participant-label $PARTICIPANT_LABEL \
        -w /work \
        --fs-license-file /resources/license.txt \
	--recon-spec /resources/pyafq_tractometry_edit.yaml \
        --output-resolution 1.0 \
        --skip-odf-reports \
	--input-type qsiprep \

Version:

QSIPrep version: 1.0.0rc2.dev0+g789be41.d20241119
QSIRecon version: 1.0.0rc3.dev0+g619341b.d20241121

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

I’m using a singularity/apptainer run on Vanderbilt’s ACCRE computing cluster.

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

It is BIDS valid because QSIprep ran successfully and I didn’t include the ignore BIDS flag!

Relevant log outputs (up to 20 lines – this is more than 20 lines b/c I’m not sure what is relevant):

[environment]
cpu_count = 256
exec_env = "singularity"
free_mem = 706.0
overcommit_policy = "heuristic"
overcommit_limit = "50%"
nipype_version = "1.9.1"
templateflow_version = "24.2.2"
version = "1.0.0rc3.dev0+g619341b.d20241121"

[execution]
bids_dir = "/data"
input_dir = "PosixPath('/data')"
atlases = []
bids_database_dir = "/work/20250917-141745_5fca6c23-72a1-4f87-953e-d0fd5c9a34bd/bids_db"
bids_description_hash = "52f468dbb9682e7b91465f7760d8a59306f62a8bbd4129aa41a70071c5676260"
boilerplate_only = false
sloppy = false
debug = []
fs_license_file = "/resources/license.txt"
layout = "BIDS Layout: .../data | Subjects: 1 | Sessions: 0 | Runs: 0"
log_dir = "/output/logs"
log_level = 25
low_mem = false
notrack = false
output_dir = "/output"
reports_only = false
run_uuid = "20250917-141745_5fca6c23-72a1-4f87-953e-d0fd5c9a34bd"
report_output_level = "root"
skip_odf_reports = true
participant_label = [ "261414",]
processing_list = [ "sub-261414/dwi/sub-261414_space-ACPC_desc-preproc_dwi.nii.gz:sub-261414/anat/sub-261414_space-ACPC_desc-preproc_T1w.nii.gz",]
templateflow_home = "/home/harrioem/.cache/templateflow"
work_dir = "/work"
write_graph = false

[workflow]
b0_threshold = 100
infant = false
input_type = "qsiprep"
recon_spec = "/resources/pyafq_tractometry_edit.yaml"
output_resolution = 1.0
qsirecon_suffixes = [ "PYAFQ",]
spaces = "MNI152NLin2009cAsym"

[nipype]
crashfile_format = "txt"
get_linked_libs = false
nprocs = 256
omp_nthreads = 8
plugin = "MultiProc"
remove_unnecessary_outputs = true
resource_monitor = false
stop_on_first_crash = false

[seeds]
master = 62155
ants = 3246
numpy = 17755

[execution.datasets]

[execution.dataset_links]
preprocessed = "/data"
templateflow = "/home/harrioem/.cache/templateflow"

[nipype.plugin_args]
maxtasksperchild = 1
raise_insufficient = false

Screenshots / relevant information:

Edited recon spec file (just added RD and AD)

description: Use pyAFQ to perform the full Tractometry pipeline
name: pyafq_tractometry
nodes:
-   action: pyafq_tractometry
    input: qsirecon
    name: pyafq_tractometry
    parameters:
        b0_threshold: 50
        brain_mask_definition: ''
        bundle_info: null
        clean_rounds: 5
        clip_edges: false
        csd_lambda_: 1
        csd_response: ''
        csd_sh_order: ''
        csd_tau: 0.1
        directions: prob
        dist_to_atlas: 4
        dist_to_waypoint: ''
        distance_threshold: 3
        export: all
        filter_b: true
        filter_by_endpoints: true
        greater_than: 50
        gtol: 0.01
        import_tract: ''
        length_threshold: 4
        mapping_definition: ''
        max_angle: 30.0
        max_bval: ''
        max_length: 250
        min_bval: ''
        min_length: 50
        min_sl: 20
        model_clust_thr: 1.25
        n_points: 100
        n_points_bundles: 40
        n_points_indiv: 40
        n_seeds: 1
        nb_points: false
        nb_streamlines: false
        odf_model: CSD
        parallel_segmentation: '{''n_jobs'': -1, ''engine'': ''joblib'', ''backend'':
            ''loky''}'
        presegment_bundle_dict: null
        presegment_kwargs: '{}'
        prob_threshold: 0
        profile_weights: gauss
        progressive: true
        pruning_thr: 12
        random_seeds: false
        reduction_thr: 25
        refine: false
        reg_algo: ''
        reg_subject_spec: power_map
        reg_template_spec: mni_T1
        return_idx: false
        rm_small_clusters: 50
        rng: ''
        rng_seed: ''
        robust_tensor_fitting: false
        roi_dist_tie_break: false
        save_intermediates: ''
        sbv_lims_bundles: '[None, None]'
        sbv_lims_indiv: '[None, None]'
        scalars: '[''dti_fa'', ''dti_md'', ''dti_ad'', ''dti_rd'']'
        seed_mask: ''
        seed_threshold: 0
        seg_algo: AFQ
        sphere: ''
        stat: mean
        step_size: 0.5
        stop_mask: ''
        stop_threshold: 0
        tracker: local
        use_external_tracking: false
        virtual_frame_buffer: false
        viz_backend_spec: plotly_no_gif
        volume_opacity_bundles: 0.3
        volume_opacity_indiv: 0.3
    qsirecon_suffix: PYAFQ
    software: pyAFQ
space: T1w

Here is my screenshot of ‘no errors to report’ from the html for this example participant, even though there’s no /dwi/ folder in their /derivatives/ folder :frowning:

It also might be worth mentioning that images were acquired on a 3T philips scanner.

If there is anything else I can include or you have any questions please of course let me know. And for the third time I do apologize if this is a stupid question or I missed something.
Thank you so very (very very!) much in advance for any assistance you might be able to provide!! :slight_smile:

Cheers,
Emily


Hi @emilymharriott!

It’s possible those subjects timed out. Can you see memory/time usage for your job with seff $JOBID? What are the last things you see in the log .out/.err messages?

Best,
Steven

Ignore my abysmal memory efficiency – here is the output of:

rtracejob 5211527

+---------------------------+-------------------------------------------+
+                   SUMMARY of ARRAY JOBS                               +
+ User name: harrioem       | job ID: 5211527
+---------------------------+-------------------------------------------+
+ Account                   | h_cutting_lab
+ Job Name                  | qsirecon_tms_summer2025_pyafq.slurm
+ No. of Submitted SubJobs  | 24
+ No. of Finished SubJobs   | 24
+ No. of Cancelled SubJobs  | 0
+ No. of Timeout SubJobs    | 0
+ No. of Successful SubJobs | 16
+ No. of Failed SubJobs     | 8
+ Requested Memory          | 128g
+ Max Memory Used by SubJobs| 6768216k
+ Original Requested Time   | 1-00:00:00
+ Max Running Time          | 00:02:09
+ Min Running Time          | 00:01:15
+ Max Waiting Time(minutes) | 1
+ Min Waiting Time(minutes) | 0
+---------------------------+-------------------------------------------+

seff 5211527

Job ID: 5211527
Array Job ID: 5211527_24
Cluster: accre
User/Group: harrioem/h_cutting_lab
State: FAILED (exit code 1)
Nodes: 1
Cores per node: 8
CPU Utilized: 00:01:30
CPU Efficiency: 10.23% of 00:14:40 core-walltime
Job Wall-clock time: 00:01:50
Memory Utilized: 6.45 GB
Memory Efficiency: 5.04% of 128.00 GB

(working on the .out/.err…)

Ah, those jobs did not last very long, so not a time out. The .out/.err hopefully will have more information.

1 Like

Here is the entirety of .out:

array id:  14 subject id:  sub-261269
250917-14:17:59,769 nipype.workflow IMPORTANT:
	 Running QSIRecon version 1.0.0rc3.dev0+g619341b.d20241121

         License NOTICE ##################################################
         QSIRecon 1.0.0rc3.dev0+g619341b.d20241121
         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.
         #################################################################
250917-14:17:59,815 nipype.workflow IMPORTANT:
	 Building QSIRecon's workflow:
           * BIDS dataset path: /data.
           * Participant list: ['261269'].
           * Run identifier: 20250917-141748_1cd04fc8-284d-4222-8d00-3f1cc198a7a7.
250917-14:18:06,823 nipype.utils INFO:
	 Collected anatomical data:
acpc_aparc: null
acpc_aseg: /data/sub-261269/anat/sub-261269_space-ACPC_desc-aseg_dseg.nii.gz
acpc_brain_mask: /data/sub-261269/anat/sub-261269_space-ACPC_desc-brain_mask.nii.gz
acpc_csf_probseg: null
acpc_gm_probseg: null
acpc_preproc: /data/sub-261269/anat/sub-261269_space-ACPC_desc-preproc_T1w.nii.gz
acpc_seg: /data/sub-261269/anat/sub-261269_space-ACPC_dseg.nii.gz
acpc_to_template_xfm: /data/sub-261269/anat/sub-261269_from-ACPC_to-MNI152NLin2009cAsym_mode-image_xfm.h5
acpc_wm_probseg: null
orig_to_acpc_xfm: null
template_to_acpc_xfm: /data/sub-261269/anat/sub-261269_from-MNI152NLin2009cAsym_to-ACPC_mode-image_xfm.h5

250917-14:18:06,824 nipype.workflow INFO:
	 Anatomical data available for /data/sub-261269/anat/sub-261269_space-ACPC_desc-preproc_T1w.nii.gz:
acpc_aparc: null
acpc_aseg: /data/sub-261269/anat/sub-261269_space-ACPC_desc-aseg_dseg.nii.gz
acpc_brain_mask: /data/sub-261269/anat/sub-261269_space-ACPC_desc-brain_mask.nii.gz
acpc_csf_probseg: null
acpc_gm_probseg: null
acpc_preproc: /data/sub-261269/anat/sub-261269_space-ACPC_desc-preproc_T1w.nii.gz
acpc_seg: /data/sub-261269/anat/sub-261269_space-ACPC_dseg.nii.gz
acpc_to_template_xfm: /data/sub-261269/anat/sub-261269_from-ACPC_to-MNI152NLin2009cAsym_mode-image_xfm.h5
acpc_wm_probseg: null
orig_to_acpc_xfm: null
template_to_acpc_xfm: /data/sub-261269/anat/sub-261269_from-MNI152NLin2009cAsym_to-ACPC_mode-image_xfm.h5

250917-14:18:06,826 nipype.workflow INFO:
	 Found high-res anatomical data in preprocessed inputs for 261269.
250917-14:18:06,826 nipype.workflow INFO:
	 acpc_aparc (<class 'str'>): None (<class 'NoneType'>)
250917-14:18:06,826 nipype.workflow INFO:
	 acpc_seg (<class 'str'>): /data/sub-261269/anat/sub-261269_space-ACPC_dseg.nii.gz (<class 'str'>)
250917-14:18:06,826 nipype.workflow INFO:
	 acpc_aseg (<class 'str'>): /data/sub-261269/anat/sub-261269_space-ACPC_desc-aseg_dseg.nii.gz (<class 'str'>)
250917-14:18:06,826 nipype.workflow INFO:
	 acpc_brain_mask (<class 'str'>): /data/sub-261269/anat/sub-261269_space-ACPC_desc-brain_mask.nii.gz (<class 'str'>)
250917-14:18:06,826 nipype.workflow INFO:
	 acpc_preproc (<class 'str'>): /data/sub-261269/anat/sub-261269_space-ACPC_desc-preproc_T1w.nii.gz (<class 'str'>)
250917-14:18:06,826 nipype.workflow INFO:
	 acpc_csf_probseg (<class 'str'>): None (<class 'NoneType'>)
250917-14:18:06,826 nipype.workflow INFO:
	 acpc_gm_probseg (<class 'str'>): None (<class 'NoneType'>)
250917-14:18:06,827 nipype.workflow INFO:
	 acpc_wm_probseg (<class 'str'>): None (<class 'NoneType'>)
250917-14:18:06,827 nipype.workflow INFO:
	 orig_to_acpc_xfm (<class 'str'>): None (<class 'NoneType'>)
250917-14:18:06,827 nipype.workflow INFO:
	 template_to_acpc_xfm (<class 'str'>): /data/sub-261269/anat/sub-261269_from-MNI152NLin2009cAsym_to-ACPC_mode-image_xfm.h5 (<class 'str'>)
250917-14:18:06,827 nipype.workflow INFO:
	 acpc_to_template_xfm (<class 'str'>): /data/sub-261269/anat/sub-261269_from-ACPC_to-MNI152NLin2009cAsym_mode-image_xfm.h5 (<class 'str'>)
250917-14:18:06,827 nipype.workflow INFO:
	 Found 1 high-res anatomicals to process
250917-14:18:06,833 nipype.workflow INFO:
	 Transforming ODF ROIs into DWI space for visual report.
250917-14:18:06,837 nipype.workflow INFO:
	 skipping ODF plots for pyafq_tractometry
250917-14:18:10,970 nipype.workflow INFO:
	 QSIRecon workflow graph with 29 nodes built successfully.
250917-14:18:24,668 nipype.workflow IMPORTANT:
	 QSIRecon started!
250917-14:18:45,482 nipype.workflow INFO:
	 [Node] Setting-up "qsirecon_1_0_wf.sub-261269_pyafq_tractometry.sub_261269_space_ACPC_desc_preproc_recon_wf.pyafq_tractometry.run_afq" in "/work/qsirecon_1_0_wf/sub-261269_pyafq_tractometry/sub_261269_space_ACPC_desc_preproc_recon_wf/pyafq_tractometry/run_afq".
250917-14:18:45,801 nipype.workflow INFO:
	 [Node] Executing "run_afq" <qsirecon.interfaces.pyafq.PyAFQRecon>
250917-14:19:02,106 nipype.workflow INFO:
	 [Node] Finished "run_afq", elapsed time 16.262581s.
250917-14:19:02,107 nipype.workflow WARNING:
	 Storing result file without outputs
250917-14:19:02,125 nipype.workflow WARNING:
	 [Node] Error on "qsirecon_1_0_wf.sub-261269_pyafq_tractometry.sub_261269_space_ACPC_desc_preproc_recon_wf.pyafq_tractometry.run_afq" (/work/qsirecon_1_0_wf/sub-261269_pyafq_tractometry/sub_261269_space_ACPC_desc_preproc_recon_wf/pyafq_tractometry/run_afq)
250917-14:19:03,562 nipype.workflow ERROR:
	 Node run_afq failed to run on host cn1609.hw.accre.vu.
250917-14:19:03,575 nipype.workflow ERROR:
	 Saving crash info to /output/sub-261269/log/20250917-141748_1cd04fc8-284d-4222-8d00-3f1cc198a7a7/crash-20250917-141903-harrioem-run_afq-fc7d9086-989b-4604-bd2a-fee9b8ab2484.txt
Traceback (most recent call last):
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/plugins/multiproc.py", line 66, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 525, in run
    result = self._run_interface(execute=True)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 643, in _run_interface
    return self._run_command(execute)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 769, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node run_afq.

Traceback:
	Traceback (most recent call last):
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/data.py", line 335, in csd_params
	    csdf = csd_fit_model(
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/models/csd.py", line 67, in _fit
	    return _model(gtab, data, response, sh_order, csd_fa_thr).fit(
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/models/csd.py", line 56, in _model
	    raise CsdNanResponseError
	AFQ.models.csd.CsdNanResponseError

	The above exception was the direct cause of the following exception:

	Traceback (most recent call last):
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 401, in run
	    runtime = self._run_interface(runtime)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/interfaces/pyafq.py", line 114, in _run_interface
	    myafq.export_all()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/api/participant.py", line 202, in export_all
	    export_all_helper(self, seg_algo, xforms, indiv, viz)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/api/utils.py", line 121, in export_all_helper
	    api_afq_object.export("template_xform")
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/api/participant.py", line 155, in export
	    return self.wf_dict[section][attr_name]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 90, in __call__
	    args.append(opts[name])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 889, in __getitem__
	    return self._examine_val(k, ps.PMap.__getitem__(self, k))
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 885, in _examine_val
	    val = val()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1164, in <lambda>
	    def curry_choice(k, args): return lambda:choose_fn(k, args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1133, in _choose_last
	    return vs[-1][k]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 90, in __call__
	    args.append(opts[name])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 889, in __getitem__
	    return self._examine_val(k, ps.PMap.__getitem__(self, k))
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 885, in _examine_val
	    val = val()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1164, in <lambda>
	    def curry_choice(k, args): return lambda:choose_fn(k, args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1133, in _choose_last
	    return vs[-1][k]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 91, in __call__
	    result = self.function(*args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/mapping.py", line 182, in get_reg_subject
	    reg_subject_spec = data_imap[filename_dict[reg_subject_spec]]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 90, in __call__
	    args.append(opts[name])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 889, in __getitem__
	    return self._examine_val(k, ps.PMap.__getitem__(self, k))
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 885, in _examine_val
	    val = val()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1164, in <lambda>
	    def curry_choice(k, args): return lambda:choose_fn(k, args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1133, in _choose_last
	    return vs[-1][k]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 91, in __call__
	    result = self.function(*args)
	  File "<string>", line 2, in wrapper_has_args_func
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/decorators.py", line 149, in wrapper_as_file
	    gen, meta = func(*args[:og_arg_count], **kwargs)
	  File "<string>", line 2, in wrapper_has_args_func
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/decorators.py", line 220, in wrapper_as_img
	    data, meta = func(*args[:og_arg_count], **kwargs)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/data.py", line 342, in csd_params
	    raise CsdNanResponseError(
	AFQ.models.csd.CsdNanResponseError: Could not compute CSD response function for file: 
	<class 'nibabel.nifti1.Nifti1Image'>
	data shape (161, 197, 171, 99)
	affine:
	[[ -1.   0.   0.  80.]
	 [  0.  -1.   0.  81.]
	 [  0.   0.   1. -80.]
	 [  0.   0.   0.   1.]]
	metadata:
	<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'
	sizeof_hdr      : 348
	data_type       : b''
	db_name         : b''
	extents         : 0
	session_error   : 0
	regular         : b''
	dim_info        : 0
	dim             : [  4 161 197 171  99   1   1   1]
	intent_p1       : 0.0
	intent_p2       : 0.0
	intent_p3       : 0.0
	intent_code     : none
	datatype        : float64
	bitpix          : 64
	slice_start     : 0
	pixdim          : [1. 1. 1. 1. 1. 1. 1. 1.]
	vox_offset      : 0.0
	scl_slope       : nan
	scl_inter       : nan
	slice_end       : 0
	slice_code      : unknown
	xyzt_units      : 0
	cal_max         : 0.0
	cal_min         : 0.0
	slice_duration  : 0.0
	toffset         : 0.0
	glmax           : 0
	glmin           : 0
	descrip         : b''
	aux_file        : b''
	qform_code      : unknown
	sform_code      : aligned
	quatern_b       : 0.0
	quatern_c       : 0.0
	quatern_d       : 1.0
	qoffset_x       : 80.0
	qoffset_y       : 81.0
	qoffset_z       : -80.0
	srow_x          : [-1.  0.  0. 80.]
	srow_y          : [ 0. -1.  0. 81.]
	srow_z          : [  0.   0.   1. -80.]
	intent_name     : b''
	magic           : b'n+1'
	.


250917-14:19:05,562 nipype.workflow ERROR:
	 could not run node: qsirecon_1_0_wf.sub-261269_pyafq_tractometry.sub_261269_space_ACPC_desc_preproc_recon_wf.pyafq_tractometry.run_afq
250917-14:19:05,630 nipype.workflow CRITICAL:
	 QSIRecon failed: Traceback (most recent call last):
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/plugins/multiproc.py", line 66, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 525, in run
    result = self._run_interface(execute=True)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 643, in _run_interface
    return self._run_command(execute)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 769, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node run_afq.

Traceback:
	Traceback (most recent call last):
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/data.py", line 335, in csd_params
	    csdf = csd_fit_model(
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/models/csd.py", line 67, in _fit
	    return _model(gtab, data, response, sh_order, csd_fa_thr).fit(
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/models/csd.py", line 56, in _model
	    raise CsdNanResponseError
	AFQ.models.csd.CsdNanResponseError

	The above exception was the direct cause of the following exception:

	Traceback (most recent call last):
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 401, in run
	    runtime = self._run_interface(runtime)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/interfaces/pyafq.py", line 114, in _run_interface
	    myafq.export_all()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/api/participant.py", line 202, in export_all
	    export_all_helper(self, seg_algo, xforms, indiv, viz)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/api/utils.py", line 121, in export_all_helper
	    api_afq_object.export("template_xform")
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/api/participant.py", line 155, in export
	    return self.wf_dict[section][attr_name]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 90, in __call__
	    args.append(opts[name])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 889, in __getitem__
	    return self._examine_val(k, ps.PMap.__getitem__(self, k))
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 885, in _examine_val
	    val = val()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1164, in <lambda>
	    def curry_choice(k, args): return lambda:choose_fn(k, args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1133, in _choose_last
	    return vs[-1][k]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 90, in __call__
	    args.append(opts[name])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 889, in __getitem__
	    return self._examine_val(k, ps.PMap.__getitem__(self, k))
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 885, in _examine_val
	    val = val()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1164, in <lambda>
	    def curry_choice(k, args): return lambda:choose_fn(k, args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1133, in _choose_last
	    return vs[-1][k]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 91, in __call__
	    result = self.function(*args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/mapping.py", line 182, in get_reg_subject
	    reg_subject_spec = data_imap[filename_dict[reg_subject_spec]]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 90, in __call__
	    args.append(opts[name])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 889, in __getitem__
	    return self._examine_val(k, ps.PMap.__getitem__(self, k))
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 885, in _examine_val
	    val = val()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1164, in <lambda>
	    def curry_choice(k, args): return lambda:choose_fn(k, args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1133, in _choose_last
	    return vs[-1][k]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 91, in __call__
	    result = self.function(*args)
	  File "<string>", line 2, in wrapper_has_args_func
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/decorators.py", line 149, in wrapper_as_file
	    gen, meta = func(*args[:og_arg_count], **kwargs)
	  File "<string>", line 2, in wrapper_has_args_func
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/decorators.py", line 220, in wrapper_as_img
	    data, meta = func(*args[:og_arg_count], **kwargs)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/data.py", line 342, in csd_params
	    raise CsdNanResponseError(
	AFQ.models.csd.CsdNanResponseError: Could not compute CSD response function for file: 
	<class 'nibabel.nifti1.Nifti1Image'>
	data shape (161, 197, 171, 99)
	affine:
	[[ -1.   0.   0.  80.]
	 [  0.  -1.   0.  81.]
	 [  0.   0.   1. -80.]
	 [  0.   0.   0.   1.]]
	metadata:
	<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'
	sizeof_hdr      : 348
	data_type       : b''
	db_name         : b''
	extents         : 0
	session_error   : 0
	regular         : b''
	dim_info        : 0
	dim             : [  4 161 197 171  99   1   1   1]
	intent_p1       : 0.0
	intent_p2       : 0.0
	intent_p3       : 0.0
	intent_code     : none
	datatype        : float64
	bitpix          : 64
	slice_start     : 0
	pixdim          : [1. 1. 1. 1. 1. 1. 1. 1.]
	vox_offset      : 0.0
	scl_slope       : nan
	scl_inter       : nan
	slice_end       : 0
	slice_code      : unknown
	xyzt_units      : 0
	cal_max         : 0.0
	cal_min         : 0.0
	slice_duration  : 0.0
	toffset         : 0.0
	glmax           : 0
	glmin           : 0
	descrip         : b''
	aux_file        : b''
	qform_code      : unknown
	sform_code      : aligned
	quatern_b       : 0.0
	quatern_c       : 0.0
	quatern_d       : 1.0
	qoffset_x       : 80.0
	qoffset_y       : 81.0
	qoffset_z       : -80.0
	srow_x          : [-1.  0.  0. 80.]
	srow_y          : [ 0. -1.  0. 81.]
	srow_z          : [  0.   0.   1. -80.]
	intent_name     : b''
	magic           : b'n+1'
	.


250917-14:19:05,639 nipype.utils WARNING:
	 DatasetType key not in /data/dataset_description.json. Assuming 'derivative'.
250917-14:19:11,32 nipype.utils WARNING:
	 DatasetType key not in /data/dataset_description.json. Assuming 'derivative'.

And here is the entirety of .err:

INFO:nipype.workflow:QSIRecon workflow graph with 29 nodes built successfully.
INFO:cli:Generating an HTML version of the citation boilerplate...
INFO:cli:Generating a LaTeX version of the citation boilerplate...
IMPORTANT:nipype.workflow:QSIRecon started!
INFO:nipype.workflow:[Node] Setting-up "qsirecon_1_0_wf.sub-261269_pyafq_tractometry.sub_261269_space_ACPC_desc_preproc_recon_wf.pyafq_tractometry.run_afq" in "/work/qsirecon_1_0_wf/sub-261269_pyafq_tractometry/sub_261269_space_ACPC_desc_preproc_recon_wf/pyafq_tractometry/run_afq".
INFO:nipype.workflow:[Node] Executing "run_afq" <qsirecon.interfaces.pyafq.PyAFQRecon>
INFO:AFQ:No seed mask given, using FA (or first scalar if none are FA)thresholded to 0.2
INFO:AFQ:No stop mask given, using FA (or first scalar if none are FA)thresholded to 0.2
INFO:AFQ:Saving /work/qsirecon_1_0_wf/sub-261269_pyafq_tractometry/sub_261269_space_ACPC_desc_preproc_recon_wf/pyafq_tractometry/run_afq/study/subject/PYAFQ/sub-261269_desc-brainmasktrans_dwi.nii.gz
WARNING:AFQ:Failed to export warped b0. This could be because your mapping type is only compatible with transformation from template to subject space. The error is: Could not compute CSD response function for file: 
<class 'nibabel.nifti1.Nifti1Image'>
data shape (161, 197, 171, 99)
affine:
[[ -1.   0.   0.  80.]
 [  0.  -1.   0.  81.]
 [  0.   0.   1. -80.]
 [  0.   0.   0.   1.]]
metadata:
<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'
sizeof_hdr      : 348
data_type       : b''
db_name         : b''
extents         : 0
session_error   : 0
regular         : b''
dim_info        : 0
dim             : [  4 161 197 171  99   1   1   1]
intent_p1       : 0.0
intent_p2       : 0.0
intent_p3       : 0.0
intent_code     : none
datatype        : float64
bitpix          : 64
slice_start     : 0
pixdim          : [1. 1. 1. 1. 1. 1. 1. 1.]
vox_offset      : 0.0
scl_slope       : nan
scl_inter       : nan
slice_end       : 0
slice_code      : unknown
xyzt_units      : 0
cal_max         : 0.0
cal_min         : 0.0
slice_duration  : 0.0
toffset         : 0.0
glmax           : 0
glmin           : 0
descrip         : b''
aux_file        : b''
qform_code      : unknown
sform_code      : aligned
quatern_b       : 0.0
quatern_c       : 0.0
quatern_d       : 1.0
qoffset_x       : 80.0
qoffset_y       : 81.0
qoffset_z       : -80.0
srow_x          : [-1.  0.  0. 80.]
srow_y          : [ 0. -1.  0. 81.]
srow_z          : [  0.   0.   1. -80.]
intent_name     : b''
magic           : b'n+1'
.
INFO:nipype.workflow:[Node] Finished "run_afq", elapsed time 16.262581s.
WARNING:nipype.workflow:Storing result file without outputs
WARNING:nipype.workflow:[Node] Error on "qsirecon_1_0_wf.sub-261269_pyafq_tractometry.sub_261269_space_ACPC_desc_preproc_recon_wf.pyafq_tractometry.run_afq" (/work/qsirecon_1_0_wf/sub-261269_pyafq_tractometry/sub_261269_space_ACPC_desc_preproc_recon_wf/pyafq_tractometry/run_afq)
ERROR:nipype.workflow:Node run_afq failed to run on host cn1609.hw.accre.vu.
ERROR:nipype.workflow:Saving crash info to /output/sub-261269/log/20250917-141748_1cd04fc8-284d-4222-8d00-3f1cc198a7a7/crash-20250917-141903-harrioem-run_afq-fc7d9086-989b-4604-bd2a-fee9b8ab2484.txt
Traceback (most recent call last):
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/plugins/multiproc.py", line 66, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 525, in run
    result = self._run_interface(execute=True)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 643, in _run_interface
    return self._run_command(execute)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 769, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node run_afq.

Traceback:
	Traceback (most recent call last):
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/data.py", line 335, in csd_params
	    csdf = csd_fit_model(
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/models/csd.py", line 67, in _fit
	    return _model(gtab, data, response, sh_order, csd_fa_thr).fit(
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/models/csd.py", line 56, in _model
	    raise CsdNanResponseError
	AFQ.models.csd.CsdNanResponseError

	The above exception was the direct cause of the following exception:

	Traceback (most recent call last):
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 401, in run
	    runtime = self._run_interface(runtime)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/interfaces/pyafq.py", line 114, in _run_interface
	    myafq.export_all()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/api/participant.py", line 202, in export_all
	    export_all_helper(self, seg_algo, xforms, indiv, viz)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/api/utils.py", line 121, in export_all_helper
	    api_afq_object.export("template_xform")
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/api/participant.py", line 155, in export
	    return self.wf_dict[section][attr_name]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 90, in __call__
	    args.append(opts[name])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 889, in __getitem__
	    return self._examine_val(k, ps.PMap.__getitem__(self, k))
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 885, in _examine_val
	    val = val()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1164, in <lambda>
	    def curry_choice(k, args): return lambda:choose_fn(k, args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1133, in _choose_last
	    return vs[-1][k]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 90, in __call__
	    args.append(opts[name])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 889, in __getitem__
	    return self._examine_val(k, ps.PMap.__getitem__(self, k))
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 885, in _examine_val
	    val = val()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1164, in <lambda>
	    def curry_choice(k, args): return lambda:choose_fn(k, args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1133, in _choose_last
	    return vs[-1][k]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 91, in __call__
	    result = self.function(*args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/mapping.py", line 182, in get_reg_subject
	    reg_subject_spec = data_imap[filename_dict[reg_subject_spec]]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 90, in __call__
	    args.append(opts[name])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 889, in __getitem__
	    return self._examine_val(k, ps.PMap.__getitem__(self, k))
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 885, in _examine_val
	    val = val()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1164, in <lambda>
	    def curry_choice(k, args): return lambda:choose_fn(k, args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1133, in _choose_last
	    return vs[-1][k]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 91, in __call__
	    result = self.function(*args)
	  File "<string>", line 2, in wrapper_has_args_func
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/decorators.py", line 149, in wrapper_as_file
	    gen, meta = func(*args[:og_arg_count], **kwargs)
	  File "<string>", line 2, in wrapper_has_args_func
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/decorators.py", line 220, in wrapper_as_img
	    data, meta = func(*args[:og_arg_count], **kwargs)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/data.py", line 342, in csd_params
	    raise CsdNanResponseError(
	AFQ.models.csd.CsdNanResponseError: Could not compute CSD response function for file: 
	<class 'nibabel.nifti1.Nifti1Image'>
	data shape (161, 197, 171, 99)
	affine:
	[[ -1.   0.   0.  80.]
	 [  0.  -1.   0.  81.]
	 [  0.   0.   1. -80.]
	 [  0.   0.   0.   1.]]
	metadata:
	<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'
	sizeof_hdr      : 348
	data_type       : b''
	db_name         : b''
	extents         : 0
	session_error   : 0
	regular         : b''
	dim_info        : 0
	dim             : [  4 161 197 171  99   1   1   1]
	intent_p1       : 0.0
	intent_p2       : 0.0
	intent_p3       : 0.0
	intent_code     : none
	datatype        : float64
	bitpix          : 64
	slice_start     : 0
	pixdim          : [1. 1. 1. 1. 1. 1. 1. 1.]
	vox_offset      : 0.0
	scl_slope       : nan
	scl_inter       : nan
	slice_end       : 0
	slice_code      : unknown
	xyzt_units      : 0
	cal_max         : 0.0
	cal_min         : 0.0
	slice_duration  : 0.0
	toffset         : 0.0
	glmax           : 0
	glmin           : 0
	descrip         : b''
	aux_file        : b''
	qform_code      : unknown
	sform_code      : aligned
	quatern_b       : 0.0
	quatern_c       : 0.0
	quatern_d       : 1.0
	qoffset_x       : 80.0
	qoffset_y       : 81.0
	qoffset_z       : -80.0
	srow_x          : [-1.  0.  0. 80.]
	srow_y          : [ 0. -1.  0. 81.]
	srow_z          : [  0.   0.   1. -80.]
	intent_name     : b''
	magic           : b'n+1'
	.


ERROR:nipype.workflow:could not run node: qsirecon_1_0_wf.sub-261269_pyafq_tractometry.sub_261269_space_ACPC_desc_preproc_recon_wf.pyafq_tractometry.run_afq
CRITICAL:nipype.workflow:QSIRecon failed: Traceback (most recent call last):
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/plugins/multiproc.py", line 66, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 525, in run
    result = self._run_interface(execute=True)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 643, in _run_interface
    return self._run_command(execute)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 769, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node run_afq.

Traceback:
	Traceback (most recent call last):
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/data.py", line 335, in csd_params
	    csdf = csd_fit_model(
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/models/csd.py", line 67, in _fit
	    return _model(gtab, data, response, sh_order, csd_fa_thr).fit(
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/models/csd.py", line 56, in _model
	    raise CsdNanResponseError
	AFQ.models.csd.CsdNanResponseError

	The above exception was the direct cause of the following exception:

	Traceback (most recent call last):
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 401, in run
	    runtime = self._run_interface(runtime)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/interfaces/pyafq.py", line 114, in _run_interface
	    myafq.export_all()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/api/participant.py", line 202, in export_all
	    export_all_helper(self, seg_algo, xforms, indiv, viz)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/api/utils.py", line 121, in export_all_helper
	    api_afq_object.export("template_xform")
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/api/participant.py", line 155, in export
	    return self.wf_dict[section][attr_name]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 90, in __call__
	    args.append(opts[name])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 889, in __getitem__
	    return self._examine_val(k, ps.PMap.__getitem__(self, k))
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 885, in _examine_val
	    val = val()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1164, in <lambda>
	    def curry_choice(k, args): return lambda:choose_fn(k, args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1133, in _choose_last
	    return vs[-1][k]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 90, in __call__
	    args.append(opts[name])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 889, in __getitem__
	    return self._examine_val(k, ps.PMap.__getitem__(self, k))
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 885, in _examine_val
	    val = val()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1164, in <lambda>
	    def curry_choice(k, args): return lambda:choose_fn(k, args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1133, in _choose_last
	    return vs[-1][k]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 91, in __call__
	    result = self.function(*args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/mapping.py", line 182, in get_reg_subject
	    reg_subject_spec = data_imap[filename_dict[reg_subject_spec]]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 90, in __call__
	    args.append(opts[name])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 889, in __getitem__
	    return self._examine_val(k, ps.PMap.__getitem__(self, k))
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 885, in _examine_val
	    val = val()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1164, in <lambda>
	    def curry_choice(k, args): return lambda:choose_fn(k, args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1133, in _choose_last
	    return vs[-1][k]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 91, in __call__
	    result = self.function(*args)
	  File "<string>", line 2, in wrapper_has_args_func
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/decorators.py", line 149, in wrapper_as_file
	    gen, meta = func(*args[:og_arg_count], **kwargs)
	  File "<string>", line 2, in wrapper_has_args_func
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/decorators.py", line 220, in wrapper_as_img
	    data, meta = func(*args[:og_arg_count], **kwargs)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/data.py", line 342, in csd_params
	    raise CsdNanResponseError(
	AFQ.models.csd.CsdNanResponseError: Could not compute CSD response function for file: 
	<class 'nibabel.nifti1.Nifti1Image'>
	data shape (161, 197, 171, 99)
	affine:
	[[ -1.   0.   0.  80.]
	 [  0.  -1.   0.  81.]
	 [  0.   0.   1. -80.]
	 [  0.   0.   0.   1.]]
	metadata:
	<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'
	sizeof_hdr      : 348
	data_type       : b''
	db_name         : b''
	extents         : 0
	session_error   : 0
	regular         : b''
	dim_info        : 0
	dim             : [  4 161 197 171  99   1   1   1]
	intent_p1       : 0.0
	intent_p2       : 0.0
	intent_p3       : 0.0
	intent_code     : none
	datatype        : float64
	bitpix          : 64
	slice_start     : 0
	pixdim          : [1. 1. 1. 1. 1. 1. 1. 1.]
	vox_offset      : 0.0
	scl_slope       : nan
	scl_inter       : nan
	slice_end       : 0
	slice_code      : unknown
	xyzt_units      : 0
	cal_max         : 0.0
	cal_min         : 0.0
	slice_duration  : 0.0
	toffset         : 0.0
	glmax           : 0
	glmin           : 0
	descrip         : b''
	aux_file        : b''
	qform_code      : unknown
	sform_code      : aligned
	quatern_b       : 0.0
	quatern_c       : 0.0
	quatern_d       : 1.0
	qoffset_x       : 80.0
	qoffset_y       : 81.0
	qoffset_z       : -80.0
	srow_x          : [-1.  0.  0. 80.]
	srow_y          : [ 0. -1.  0. 81.]
	srow_z          : [  0.   0.   1. -80.]
	intent_name     : b''
	magic           : b'n+1'
	.


WARNING:nipype.utils:DatasetType key not in /data/dataset_description.json. Assuming 'derivative'.
WARNING:nipype.utils:DatasetType key not in /data/dataset_description.json. Assuming 'derivative'.

Hi @emilymharriott,

Looks like this error: PyAFQ failure · Issue #129 · PennLINC/qsirecon · GitHub. We updated DIPY in more recent containers, can you try updating QSIRecon?

You can also consider using MRTrix tractography in pyafq, since MRTrix FODs are usually more reliable. For example, qsirecon/qsirecon/data/pipelines/mrtrix_multishell_msmt_pyafq_tractometry.yaml at main · PennLINC/qsirecon · GitHub

1 Like

I can absolutely give that a try!! Thank you so very much for your help! (truly I am beyond grateful)

To make 100% sure I’m doing the right thing… I’m updating to qsirecon version 1.1.1 (first/top version on the “What’s New” page on qsirecon read the docs?)?

So then to download that container the command would be…
apptainer build qsirecon-<version>.sif docker://pennlinc/qsirecon:<version>
specifically…
apptainer build qsirecon-1.1.1.sif docker://pennlinc/qsirecon:1.1.1

??

Yup! You can see all the container releases here: https://hub.docker.com/r/pennlinc/qsirecon/tags

1 Like

Perfect!! Okay I am working on this now (just taking a second to copy/build/copy etc. etc. etc.)… stay tuned.

(thank you so much!)

Sad update: the same 8/24 sessions failed using (what I thought was qsirecon version 1.1.1 as I used that line exactly ^ to download the container?) QSIRecon version: 1.1.2.dev0+gfa8673957.d20250819. And the htmls still say no errors to report!

Here is something that might help? It’s called crash-20250926-171753-harrioem-run_afq-1fd35969-4902-4639-8a90-f57125ca2e5c.txt

Node: qsirecon_1_1_wf.sub-261269_pyafq_tractometry.sub_261269_space_ACPC_desc_preproc_recon_wf.pyafq_tractometry.run_afq
Working directory: /work/qsirecon_1_1_wf/sub-261269_pyafq_tractometry/sub_261269_space_ACPC_desc_preproc_recon_wf/pyafq_tractometry/run_afq

Node inputs:

bval_file = <undefined>
bvec_file = <undefined>
dwi_file = <undefined>
itk_file = <undefined>
kwargs = {'directions': 'prob', 'max_angle': 30.0, 'sphere': None, 'seed_mask': None, 'seed_threshold': 0, 'n_seeds': 1, 'random_seeds': False, 'rng_seed': None, 'stop_mask': None, 'stop_threshold': 0, 'step_size': 0.5, 'odf_model': 'CSD', 'tracker': 'local', 'nb_points': False, 'nb_streamlines': False, 'clip_edges': False, 'parallel_segmentation': {'n_jobs': -1, 'engine': 'joblib', 'backend': 'loky'}, 'prob_threshold': 0, 'dist_to_waypoint': None, 'rng': None, 'return_idx': False, 'filter_by_endpoints': True, 'dist_to_atlas': 4, 'save_intermediates': None, 'n_points': 100, 'clean_rounds': 5, 'distance_threshold': 3, 'length_threshold': 4, 'min_sl': 20, 'stat': 'mean', 'min_bval': None, 'max_bval': None, 'filter_b': True, 'b0_threshold': 50, 'robust_tensor_fitting': False, 'csd_response': None, 'csd_sh_order': None, 'csd_lambda_': 1, 'csd_tau': 0.1, 'gtol': 0.01, 'brain_mask_definition': None, 'bundle_info': None, 'reg_template_spec': 'mni_T1', 'mapping_definition': None, 'reg_subject_spec': 'power_map', 'profile_weights': 'gauss', 'scalars': ['dti_fa', 'dti_md', 'dti_ad', 'dti_rd'], 'import_tract': None, 'sbv_lims_bundles': [None, None], 'volume_opacity_bundles': 0.3, 'n_points_bundles': 40, 'sbv_lims_indiv': [None, None], 'volume_opacity_indiv': 0.3, 'n_points_indiv': 40, 'viz_backend_spec': 'plotly_no_gif', 'virtual_frame_buffer': False, 'omp_nthreads': 8}
mask_file = <undefined>
n_procs = 8
tck_file = <undefined>

Traceback (most recent call last):
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/plugins/multiproc.py", line 66, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 525, in run
    result = self._run_interface(execute=True)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 643, in _run_interface
    return self._run_command(execute)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 769, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node run_afq.

Traceback:
	Traceback (most recent call last):
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/data.py", line 340, in csd_params
	    csdf = csd_fit_model(
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/models/csd.py", line 67, in _fit
	    return _model(gtab, data, response, sh_order, csd_fa_thr).fit(
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/models/csd.py", line 56, in _model
	    raise CsdNanResponseError
	AFQ.models.csd.CsdNanResponseError

	The above exception was the direct cause of the following exception:

	Traceback (most recent call last):
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 401, in run
	    runtime = self._run_interface(runtime)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/interfaces/pyafq.py", line 114, in _run_interface
	    myafq.export_all()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/api/participant.py", line 201, in export_all
	    export_all_helper(self, xforms, indiv, viz)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/api/utils.py", line 121, in export_all_helper
	    api_afq_object.export("template_xform")
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/api/participant.py", line 155, in export
	    return self.wf_dict[section][attr_name]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 90, in __call__
	    args.append(opts[name])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 889, in __getitem__
	    return self._examine_val(k, ps.PMap.__getitem__(self, k))
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 885, in _examine_val
	    val = val()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1164, in <lambda>
	    def curry_choice(k, args): return lambda:choose_fn(k, args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1133, in _choose_last
	    return vs[-1][k]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 90, in __call__
	    args.append(opts[name])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 889, in __getitem__
	    return self._examine_val(k, ps.PMap.__getitem__(self, k))
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 885, in _examine_val
	    val = val()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1164, in <lambda>
	    def curry_choice(k, args): return lambda:choose_fn(k, args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1133, in _choose_last
	    return vs[-1][k]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 91, in __call__
	    result = self.function(*args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/mapping.py", line 212, in get_reg_subject
	    reg_subject_spec = data_imap[filename_dict[reg_subject_spec]]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 90, in __call__
	    args.append(opts[name])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 889, in __getitem__
	    return self._examine_val(k, ps.PMap.__getitem__(self, k))
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 885, in _examine_val
	    val = val()
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1164, in <lambda>
	    def curry_choice(k, args): return lambda:choose_fn(k, args)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/util.py", line 1133, in _choose_last
	    return vs[-1][k]
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 470, in __getitem__
	    self._run_node(self.plan.efferents[k])
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 534, in _run_node
	    if not found: res = node(self)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/pimms/calculation.py", line 91, in __call__
	    result = self.function(*args)
	  File "<string>", line 2, in wrapper_has_args_func
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/decorators.py", line 146, in wrapper_as_file
	    gen, meta = func(*args[:og_arg_count], **kwargs)
	  File "<string>", line 2, in wrapper_has_args_func
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/decorators.py", line 216, in wrapper_as_img
	    data, meta = func(*args[:og_arg_count], **kwargs)
	  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/AFQ/tasks/data.py", line 347, in csd_params
	    raise CsdNanResponseError(
	AFQ.models.csd.CsdNanResponseError: Could not compute CSD response function for file: 
	<class 'nibabel.nifti1.Nifti1Image'>
	data shape (161, 197, 171, 99)
	affine:
	[[ -1.   0.   0.  80.]
	 [  0.  -1.   0.  81.]
	 [  0.   0.   1. -80.]
	 [  0.   0.   0.   1.]]
	metadata:
	<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'
	sizeof_hdr      : 348
	data_type       : b''
	db_name         : b''
	extents         : 0
	session_error   : 0
	regular         : b''
	dim_info        : 0
	dim             : [  4 161 197 171  99   1   1   1]
	intent_p1       : 0.0
	intent_p2       : 0.0
	intent_p3       : 0.0
	intent_code     : none
	datatype        : float64
	bitpix          : 64
	slice_start     : 0
	pixdim          : [1. 1. 1. 1. 1. 1. 1. 1.]
	vox_offset      : 0.0
	scl_slope       : nan
	scl_inter       : nan
	slice_end       : 0
	slice_code      : unknown
	xyzt_units      : 0
	cal_max         : 0.0
	cal_min         : 0.0
	slice_duration  : 0.0
	toffset         : 0.0
	glmax           : 0
	glmin           : 0
	descrip         : b''
	aux_file        : b''
	qform_code      : unknown
	sform_code      : aligned
	quatern_b       : 0.0
	quatern_c       : 0.0
	quatern_d       : 1.0
	qoffset_x       : 80.0
	qoffset_y       : 81.0
	qoffset_z       : -80.0
	srow_x          : [-1.  0.  0. 80.]
	srow_y          : [ 0. -1.  0. 81.]
	srow_z          : [  0.   0.   1. -80.]
	intent_name     : b''
	magic           : b'n+1'
	.


(freesurfer → mrtrix is in progress in the background, freesurfer running on all 24 subjects currently - thanks for the suggestion!!)

FreeSurfer finished, running your suggested mrtrix/pyafq pipeline… cross your fingers!! (thanks again so so much for all of your help!)

Okay! So! Your recommended mrtrix pipeline (“MRTrix tractography in pyafq”) just finished. Woohoo!

If I go in /qsirecon_output/derivatives/, I see /freesurfer/ [I made that & populated that folder], /qsirecon-MRtrix3/, and /qsirecon-PYAFQ/.
In /qsirecon-MRtrix3/, there are 25 directories (/logs/ + 24 directories for 24 scan sessions) and 24 htmls for 24 scan sessions. If I look in the 24 directories for 24 scan sessions, I see /dwi/ and /figures/ in each one. Yay!
In /qsirecon-PYAFQ/, there are 25 directories (/logs/ + 24 directories for 24 scan sessions) and 24 htmls for 24 scan sessions. If I look in the 24 directories for 24 scan sessions, I see /dwi/ and /figures/ in, 16/24 and only /figures/ in 8/24 (again - also it’s the same 8 scan sessions again).

Is that expected? What do you think?

(THANK YOU SO MUCH)

PS: when I did this I was using qsirecon 1.1.1 that is labeled as 1.1.2 in the html, as mentioned above (this is the updated container I just downloaded)