nipy / nipype

Workflows and interfaces for neuroimaging packages
https://nipype.readthedocs.org/en/latest/
Other
751 stars 530 forks source link

prepreprocflow.topup #2950

Open JoyceWoo97 opened 5 years ago

JoyceWoo97 commented 5 years ago

Summary

nipype.interfaces.fsl.epi.TOPUP error

Actual behavior

The nodes in workflow should connect to TOPUP

Expected behavior

How to replicate the behavior

Script/Workflow details

Please put URL to code or code here (if not too long).

Platform details:

prepreprocflow = Workflow(name='prepreprocflow') prepreprocflow.connect([(infosource,select_pes, [('subject_id','subject_id')]), (infosource,select_func, [('subject_id','subject_id')]), (select_pes,trim_PEs, [('pes','in_file')]), (trim_PEs,sort_pe_list, [('roi_file','pes')]), (sort_pe_list,topup, [('in_file','in_file')]), (topup, apply_topup, [('out_fieldcoef','in_topup_fieldcoef'), ('out_movpar','in_topup_movpar')]), (select_func, apply_topup, [('func','in_files')]), (apply_topup, datasink, [('out_corrected','unwarped_funcs')]) ]) prepreprocflow.base_dir = workflow_dir prepreprocflow.write_graph(graph2use='flat') prepreprocflow.run('MultiProc', plugin_args={'n_procs': proc_cores, 'memory_gb':20}) ``` 190625-14:25:08,994 nipype.workflow INFO: Generated workflow graph: /Users/joyce/Desktop/SUMMER_2019_HUMPHREYS/1058/workflows/prepreprocflow/graph.png (graph2use=flat, simple_form=True). 190625-14:25:09,23 nipype.workflow INFO: Workflow prepreprocflow settings: ['check', 'execution', 'logging', 'monitoring'] 190625-14:25:09,92 nipype.workflow INFO: Running in parallel. 190625-14:25:09,124 nipype.workflow INFO: [MultiProc] Running 0 tasks, and 2 jobs ready. Free memory (GB): 20.00/20.00, Free processors: 4/4. 190625-14:25:09,297 nipype.workflow INFO: [Node] Setting-up "prepreprocflow.select_pes" in "/private/var/folders/bp/8cgkghx93b5gth_xyw10zjw40000gn/T/tmppBKg6y/select_pes". 190625-14:25:09,263 nipype.workflow INFO: [Node] Setting-up "prepreprocflow.select_func" in "/private/var/folders/bp/8cgkghx93b5gth_xyw10zjw40000gn/T/tmpznyulQ/select_func". 190625-14:25:09,340 nipype.workflow INFO: [Node] Running "select_func" ("nipype.interfaces.io.SelectFiles") 190625-14:25:09,341 nipype.workflow INFO: [Node] Running "select_pes" ("nipype.interfaces.io.SelectFiles") 190625-14:25:09,367 nipype.workflow INFO: [Node] Finished "prepreprocflow.select_func". 190625-14:25:09,372 nipype.workflow INFO: [Node] Finished "prepreprocflow.select_pes". 190625-14:25:11,125 nipype.workflow INFO: [Job 0] Completed (prepreprocflow.select_func). 190625-14:25:11,140 nipype.workflow INFO: [Job 1] Completed (prepreprocflow.select_pes). 190625-14:25:11,145 nipype.workflow INFO: [MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 20.00/20.00, Free processors: 4/4. 190625-14:25:11,356 nipype.workflow INFO: [Job 2] Cached (prepreprocflow.trim_PEs). 190625-14:25:13,209 nipype.workflow INFO: [Node] Outdated cache found for "prepreprocflow.sort_pe_list". 190625-14:25:13,220 nipype.workflow INFO: [Node] Setting-up "prepreprocflow.sort_pe_list" in "/Users/joyce/Desktop/SUMMER_2019_HUMPHREYS/1058/workflows/prepreprocflow/_subject_id_1058/sort_pe_list". 190625-14:25:13,229 nipype.workflow INFO: [Node] Outdated cache found for "prepreprocflow.sort_pe_list". 190625-14:25:13,251 nipype.workflow INFO: [Node] Running "sort_pe_list" ("nipype.interfaces.utility.wrappers.Function") [u'/Users/joyce/Desktop/SUMMER_2019_HUMPHREYS/1058/workflows/prepreprocflow/_subject_id_1058/trim_PEs/mapflow/_trim_PEs0/Humphreys_137502.09.01.21-53-52.WIP_rsEPI-Fsp_180mm_MB3R1_HS0.8.01_roi.nii.gz'] 190625-14:25:13,277 nipype.workflow DEBUG: Needed files: /Users/joyce/Desktop/SUMMER_2019_HUMPHREYS/1058/workflows/prepreprocflow/_subject_id_1058/sort_pe_list/_0x5073159788c38fb8342daa4a0fc7f8de_unfinished.json;/Users/joyce/Desktop/SUMMER_2019_HUMPHREYS/1058/workflows/prepreprocflow/_subject_id_1058/sort_pe_list/_inputs.pklz;/Users/joyce/Desktop/SUMMER_2019_HUMPHREYS/1058/workflows/prepreprocflow/_subject_id_1058/sort_pe_list/_node.pklz 190625-14:25:13,280 nipype.workflow DEBUG: Needed dirs: /Users/joyce/Desktop/SUMMER_2019_HUMPHREYS/1058/workflows/prepreprocflow/_subject_id_1058/sort_pe_list/_report 190625-14:25:13,288 nipype.workflow DEBUG: Removing files: 190625-14:25:13,303 nipype.workflow DEBUG: saved results in /Users/joyce/Desktop/SUMMER_2019_HUMPHREYS/1058/workflows/prepreprocflow/_subject_id_1058/sort_pe_list/result_sort_pe_list.pklz 190625-14:25:13,307 nipype.workflow DEBUG: [Node] Writing post-exec report to "/Users/joyce/Desktop/SUMMER_2019_HUMPHREYS/1058/workflows/prepreprocflow/_subject_id_1058/sort_pe_list/_report/report.rst" 190625-14:25:13,319 nipype.workflow DEBUG: Aggregate: False 190625-14:25:13,336 nipype.workflow INFO: [Node] Finished "prepreprocflow.sort_pe_list". 190625-14:25:15,123 nipype.workflow INFO: [Job 3] Completed (prepreprocflow.sort_pe_list). 190625-14:25:15,131 nipype.workflow INFO: [MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 20.00/20.00, Free processors: 4/4. 190625-14:25:15,213 nipype.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: prepreprocflow.topup Interface: nipype.interfaces.fsl.epi.TOPUP Traceback: Traceback (most recent call last): File "/anaconda2/lib/python2.7/site-packages/nipype/pipeline/plugins/base.py", line 338, in _local_hash_check cached, updated = self.procs[jobid].is_cached() File "/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 296, in is_cached hashed_inputs, hashvalue = self._get_hashval() File "/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 493, in _get_hashval self._get_inputs() File "/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 540, in _get_inputs self.set_input(key, deepcopy(output_value)) File "/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 278, in set_input setattr(self.inputs, parameter, deepcopy(val)) File "/anaconda2/lib/python2.7/site-packages/nipype/interfaces/base/traits_extension.py", line 103, in validate validated_value = super(File, self).validate(object, name, value) File "/anaconda2/lib/python2.7/site-packages/traits/trait_types.py", line 491, in validate self.error(object, name, value) File "/anaconda2/lib/python2.7/site-packages/traits/trait_handlers.py", line 236, in error object, name, self.full_info(object, name, value), value TraitError: The 'in_file' trait of a TOPUPInputSpec instance must be an existing file name, but a value of [] was specified. Error setting node input: Node: topup input: in_file results_file: /Users/joyce/Desktop/SUMMER_2019_HUMPHREYS/1058/workflows/prepreprocflow/_subject_id_1058/sort_pe_list/result_sort_pe_list.pklz value: [] 190625-14:25:15,231 nipype.workflow INFO: [Node] Setting-up "prepreprocflow.topup" in "/Users/joyce/Desktop/SUMMER_2019_HUMPHREYS/1058/workflows/prepreprocflow/_subject_id_1058/topup". 190625-14:25:17,124 nipype.workflow ERROR: Node topup.a0 failed to run on host Joyces-MacBook-Air-5.local. 190625-14:25:17,127 nipype.workflow ERROR: Saving crash info to /Users/joyce/Desktop/SUMMER_2019_HUMPHREYS/pipelines/crash-20190625-142517-joyce-topup.a0-0f9a3cf1-3817-448e-ade5-af26c2d4d4cb.pklz Traceback (most recent call last): File "/anaconda2/lib/python2.7/site-packages/nipype/pipeline/plugins/multiproc.py", line 69, in run_node result['result'] = node.run(updatehash=updatehash) File "/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 410, in run cached, updated = self.is_cached() File "/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 296, in is_cached hashed_inputs, hashvalue = self._get_hashval() File "/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 493, in _get_hashval self._get_inputs() File "/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 540, in _get_inputs self.set_input(key, deepcopy(output_value)) File "/anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 278, in set_input setattr(self.inputs, parameter, deepcopy(val)) File "/anaconda2/lib/python2.7/site-packages/nipype/interfaces/base/traits_extension.py", line 103, in validate validated_value = super(File, self).validate(object, name, value) File "/anaconda2/lib/python2.7/site-packages/traits/trait_types.py", line 491, in validate self.error(object, name, value) File "/anaconda2/lib/python2.7/site-packages/traits/trait_handlers.py", line 236, in error object, name, self.full_info(object, name, value), value TraitError: The 'in_file' trait of a TOPUPInputSpec instance must be an existing file name, but a value of [] was specified. Error setting node input: Node: topup input: in_file results_file: /Users/joyce/Desktop/SUMMER_2019_HUMPHREYS/1058/workflows/prepreprocflow/_subject_id_1058/sort_pe_list/result_sort_pe_list.pklz value: [] 190625-14:25:17,145 nipype.workflow INFO: [MultiProc] Running 0 tasks, and 0 jobs ready. Free memory (GB): 20.00/20.00, Free processors: 4/4. 190625-14:25:19,123 nipype.workflow INFO: *********************************** 190625-14:25:19,126 nipype.workflow ERROR: could not run node: prepreprocflow.topup.a0 190625-14:25:19,128 nipype.workflow INFO: crashfile: /Users/joyce/Desktop/SUMMER_2019_HUMPHREYS/pipelines/crash-20190625-142517-joyce-topup.a0-0f9a3cf1-3817-448e-ade5-af26c2d4d4cb.pklz 190625-14:25:19,131 nipype.workflow INFO: *********************************** --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) in () 13 prepreprocflow.base_dir = workflow_dir 14 prepreprocflow.write_graph(graph2use='flat') ---> 15 prepreprocflow.run('MultiProc', plugin_args={'n_procs': proc_cores, 'memory_gb':20}) /anaconda2/lib/python2.7/site-packages/nipype/pipeline/engine/workflows.pyc in run(self, plugin, plugin_args, updatehash) 597 if str2bool(self.config['execution']['create_report']): 598 self._write_report_info(self.base_dir, self.name, execgraph) --> 599 runner.run(execgraph, updatehash=updatehash, config=self.config) 600 datestr = datetime.utcnow().strftime('%Y%m%dT%H%M%S') 601 if str2bool(self.config['execution']['write_provenance']): /anaconda2/lib/python2.7/site-packages/nipype/pipeline/plugins/base.pyc in run(self, graph, config, updatehash) 189 190 self._remove_node_dirs() --> 191 report_nodes_not_run(notrun) 192 193 # close any open resources /anaconda2/lib/python2.7/site-packages/nipype/pipeline/plugins/tools.pyc in report_nodes_not_run(notrun) 80 logger.debug(subnode._id) 81 logger.info("***********************************") ---> 82 raise RuntimeError(('Workflow did not execute cleanly. ' 83 'Check log for details')) 84 RuntimeError: Workflow did not execute cleanly. Check log for details ``` ### Execution environment Choose one - Container [Tag: ???] - My python environment inside container [Base Tag: ???] - My python environment outside container
effigies commented 5 years ago

Can you provide the full script?