TraitError- The trait moving_image of a Generate Sampling Reference Input Spec instance is an existing file name, but the path does not exist

[Node] Finished “fmriprep_wf.single_subject_018_wf.func_preproc_task_batns_run_2_wf.bold_reference_wf.enhance_and_skullstrip_bold_wf.apply_mask”.
180722-16:45:56,61 workflow INFO:
[Node] Setting-up “fmriprep_wf.single_subject_018_wf.func_preproc_task_batst_run_1_wf.bold_reference_wf.validate” in “/root/src/fmriprep/work/fmriprep_wf/single_subject_018_wf/func_preproc_task_batst_run_1_wf/bold_reference_wf/validate”.
180722-16:45:56,63 workflow INFO:
[Node] Running “validate” (“fmriprep.interfaces.images.ValidateImage”)
180722-16:45:56,107 workflow INFO:
[Node] Finished “fmriprep_wf.single_subject_018_wf.func_preproc_task_batst_run_1_wf.bold_reference_wf.validate”.
180722-16:45:57,542 workflow INFO:
[Node] Setting-up “fmriprep_wf.single_subject_018_wf.func_preproc_task_batst_run_1_wf.bold_split” in “/root/src/fmriprep/work/fmriprep_wf/single_subject_018_wf/func_preproc_task_batst_run_1_wf/bold_split”.
180722-16:45:57,545 workflow INFO:
[Node] Running “bold_split” (“niworkflows.nipype.interfaces.fsl.utils.Split”), a CommandLine Interface with command:
fslsplit /data/sub-018/func/sub-018_task-batst_run-1_bold.nii.gz -t
180722-16:45:58,63 workflow INFO:
[Node] Finished “fmriprep_wf.single_subject_018_wf.func_preproc_task_batst_run_1_wf.bold_split”.
180722-16:45:59,364 workflow WARNING:
Error while checking node hash, forcing re-run. Although this error may not prevent the workflow from running, it could indicate a major problem. Please report a new issue at https://github.com/nipy/nipype/issues adding the following information:

Node: fmriprep_wf.single_subject_018_wf.func_preproc_task_batst_run_1_wf.bold_mni_trans_wf.gen_ref
Interface: niworkflows.interfaces.utils.GenerateSamplingReference
Traceback:
Traceback (most recent call last):

File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/base.py”, line 341, in _local_hash_check
cached, updated = self.procs[jobid].is_cached()

File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py”, line 303, in is_cached
hashed_inputs, hashvalue = self._get_hashval()

File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py”, line 497, in _get_hashval
self._get_inputs()

File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py”, line 540, in _get_inputs
self.set_input(key, deepcopy(output_value))

File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py”, line 285, in set_input
setattr(self.inputs, parameter, deepcopy(val))

File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base/traits_extension.py”, line 112, in validate
self.info_text, value))

traits.trait_errors.TraitError: The trait ‘moving_image’ of a GenerateSamplingReferenceInputSpec instance is an existing file name, but the path ‘/’ does not exist.
Error setting node input:
Node: gen_ref
input: moving_image
results_file: /root/src/fmriprep/work/fmriprep_wf/single_subject_018_wf/func_preproc_task_batst_run_1_wf/bold_split/result_bold_split.pklz
value: /

180722-16:46:00,350 workflow INFO:
[Node] Setting-up “fmriprep_wf.single_subject_018_wf.func_preproc_task_batst_run_1_wf.bold_mni_trans_wf.gen_ref” in “/root/src/fmriprep/work/fmriprep_wf/single_subject_018_wf/func_preproc_task_batst_run_1_wf/bold_mni_trans_wf/gen_ref”.
Traceback (most recent call last):
File “/usr/local/miniconda/bin/fmriprep”, line 11, in
load_entry_point(‘fmriprep==1.0.12’, ‘console_scripts’, ‘fmriprep’)()
File “/usr/local/miniconda/lib/python3.6/site-packages/fmriprep/cli/run.py”, line 314, in main
fmriprep_wf.run(**plugin_settings)
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/workflows.py”, line 595, in run
runner.run(execgraph, updatehash=updatehash, config=self.config)
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/base.py”, line 168, in run
self._clean_queue(jobid, graph, result=result))
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/base.py”, line 227, in _clean_queue
raise RuntimeError("".join(result[‘traceback’]))
RuntimeError: Traceback (most recent call last):
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/multiproc.py”, line 68, in run_node
result[‘result’] = node.run(updatehash=updatehash)
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py”, line 417, in run
cached, updated = self.is_cached()
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py”, line 303, in is_cached
hashed_inputs, hashvalue = self._get_hashval()
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py”, line 497, in _get_hashval
self._get_inputs()
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py”, line 540, in _get_inputs
self.set_input(key, deepcopy(output_value))
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py”, line 285, in set_input
setattr(self.inputs, parameter, deepcopy(val))
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base/traits_extension.py”, line 112, in validate
self.info_text, value))
traits.trait_errors.TraitError: The trait ‘moving_image’ of a GenerateSamplingReferenceInputSpec instance is an existing file name, but the path ‘/’ does not exist.
Error setting node input:
Node: gen_ref
input: moving_image
results_file: /root/src/fmriprep/work/fmriprep_wf/single_subject_018_wf/func_preproc_task_batst_run_1_wf/bold_split/result_bold_split.pklz
value: /

RUNNING: docker run --rm -it -v D:\license.txt:/opt/freesurfer/license.txt:ro -v D:\elbit\bat_bids_runs_filtered:/data:ro -v D:\elbit\runs_fmriprep_all:/out poldracklab/fmriprep:1.0.12 /data /out participant --participant_label 016 017 018 019 020 --debug --fs-no-reconall --use-syn-sdc --resource-monitor --write-graph --notrack
fMRIPrep: Please report errors to https://github.com/poldracklab/fmriprep/issues

Bizarre:

  • Does the input dataset validate?
  • Could you try rerunning with an empty working directory?
1 Like

Will check and update.
Many thanks!

Sorry-
Will never create a post about fmriprep again before re-validation the dataset…
Indeed- there was one bad nifti (somehow not 4-D… one run in a big dataset with the same protocol). :frowning:
(On the other hand- if one would google the error- he may find this post and recheck his data set, so it’s not so bad after all :slight_smile: )

1 Like