Fmriprep-docker fieldmap correction

I have trying to us fmriprep-docker on a data set with TOPUP (AP, PA) fieldmap correction. I have run bids-validator on my data set (single subject at this moment) and everything looks ok. My json files for the two AP and PA acquisitions are

cat sub-34P1030fmap_acq-rest_dir-AP_epi.json
“PhaseEncodingDirection”: “j-”,
“TotalReadoutTime”: 0.079,
“IntendedFor”: “func/sub-34P1030fmap_task-rest_bold.nii.gz”


cat sub-34P1030fmap_acq-rest_dir-AP_epi.json
“PhaseEncodingDirection”: “j-”,
“TotalReadoutTime”: 0.079,
“IntendedFor”: “func/sub-34P1030fmap_task-rest_bold.nii.gz”

respectively. Unfortunately, I encounter a problem very quickly into the processing. The crash report in the HTML report is at the end of this post. It looks as if the input file for the merge node is not being treated as an array but as a string. This results in the filename being split into individual characters. At least that is my interpretation of what is going on.

Any suggestions on how to fix this problem? Basically, I just want to run a functional data set with a TOPUP distortion correction.

Thanks in advance for your help.


Node Name: fmriprep_wf.single_subject_34P1030_wf.func_preproc_task_rest_wf.pepolar_unwarp_wf.prepare_epi_matching_wf.merge
File: crash-20170721-203045-root-merge-472715c2-90c1-43cc-b840-034b1a4937ee.pklz
Working Directory: /scratch/fmriprep_wf/single_subject_34P1030_wf/func_preproc_task_rest_wf/pepolar_unwarp_wf/prepare_epi_matching_wf/merge
auto_detect_sensitivity: True
environ: {‘SUBJECTS_DIR’: ‘/opt/freesurfer/subjects’}
fixed_timepoint: True
ignore_exception: False
initial_timepoint: 1
intensity_scaling: True
no_iteration: True
out_file: template.nii.gz
subjects_dir: /opt/freesurfer/subjects
subsample_threshold: 200
terminal_output: stream
Traceback (most recent call last):
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/”, line 301, in send_procs_to_workers
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/”, line 244, in hash_exists
hashed_inputs, hashvalue = self.get_hashval()
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/”, line 407, in get_hashval
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/”, line 467, in get_inputs
self.set_input(key, deepcopy(output_value))
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/”, line 223, in set_input
setattr(self.inputs, parameter, deepcopy(val))
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/”, line 2076, in validate
value = super(MultiPath, self).validate(object, name, newvalue)
File “/usr/local/miniconda/lib/python3.6/site-packages/traits/”, line 2336, in validate
return TraitListObject( self, object, name, value )
File “/usr/local/miniconda/lib/python3.6/site-packages/traits/”, line 2313, in init
raise excp
File “/usr/local/miniconda/lib/python3.6/site-packages/traits/”, line 2305, in init
value = [ validate( object, name, val ) for val in value ]
File “/usr/local/miniconda/lib/python3.6/site-packages/traits/”, line 2305, in
value = [ validate( object, name, val ) for val in value ]
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/”, line 92, in validate
self.info_text, value))
traits.trait_errors.TraitError: The trait ‘in_files’ of a RobustTemplateInputSpec instance is an existing file name, but the path ‘/’ does not exist.
Error setting node input:
Node: merge
input: in_files
results_file: /scratch/fmriprep_wf/single_subject_34P1030_wf/func_preproc_task_rest_wf/pepolar_unwarp_wf/prepare_epi_matching_wf/split/result_split.pklz
value: [’/’, ‘s’, ‘c’, ‘r’, ‘a’, ‘t’, ‘c’, ‘h’, ‘/’, ‘f’, ‘m’, ‘r’, ‘i’, ‘p’, ‘r’, ‘e’, ‘p’, '
’, ‘w’, ‘f’, ‘/’, ‘s’, ‘i’, ‘n’, ‘g’, ‘l’, ‘e’, '
’, ‘s’, ‘u’, ‘b’, ‘j’, ‘e’, ‘c’, ‘t’, '
’, ‘3’, ‘4’, ‘P’, ‘1’, ‘0’, ‘3’, ‘0’, '
’, ‘w’, ‘f’, ‘/’, ‘f’, ‘u’, ‘n’, ‘c’, '
’, ‘p’, ‘r’, ‘e’, ‘p’, ‘r’, ‘o’, ‘c’, ‘’, ‘t’, ‘a’, ‘s’, ‘k’, '’, ‘r’, ‘e’, ‘s’, ‘t’, ‘’, ‘w’, ‘f’, ‘/’, ‘p’, ‘e’, ‘p’, ‘o’, ‘l’, ‘a’, ‘r’, '’, ‘u’, ‘n’, ‘w’, ‘a’, ‘r’, ‘p’, ‘’, ‘w’, ‘f’, ‘/’, ‘p’, ‘r’, ‘e’, ‘p’, ‘a’, ‘r’, ‘e’, '’, ‘e’, ‘p’, ‘i’, ‘’, ‘m’, ‘a’, ‘t’, ‘c’, ‘h’, ‘i’, ‘n’, ‘g’, '’, ‘w’, ‘f’, ‘/’, ‘s’, ‘p’, ‘l’, ‘i’, ‘t’, ‘/’, ‘m’, ‘a’, ‘p’, ‘f’, ‘l’, ‘o’, ‘w’, ‘/’, ‘_’, ‘s’, ‘p’, ‘l’, ‘i’, ‘t’, ‘0’, ‘/’, ‘v’, ‘o’, ‘l’, ‘0’, ‘0’, ‘0’, ‘0’, ‘.’, ‘n’, ‘i’, ‘i’, ‘.’, ‘g’, ‘z’]

This looks like a bug where a string is being treated as a list. Could you open an issue on the GitHub page for this?

Absolutely. I will post in a few minutes.

1 Like

I bet FMRIPREP expects IntendedFor to be a list of strings, but according to BIDS it’s perfectly ok that it’s a single string.

1 Like