Skip to content

FIRST segmentation throws traiterror #2872

Open
@RiaanZoetmulder

Description

@RiaanZoetmulder

Summary

I am writing code to create several segmentations, one of which is segmentations using FIRST. This seems to create some issues however. It throws this error and no crash log:

                Currently running:
                   * _segmentation1
                   * _segmentation0

190203-13:17:07,238 nipype.workflow WARNING:
[Node] Error on "_segmentation1" (/mnt/e/Projects/medical-taskonomy/testdata/example_preprocess/segmentation/mapflow/_segmentation1)
190203-13:17:08,681 nipype.workflow ERROR:
Node _segmentation1 failed to run on host 18-012665.
190203-13:17:08,684 nipype.workflow ERROR:
Saving crash info to /home/rzoetmulder/crash-20190203-131708-rzoetmulder-_segmentation1-57d356fa-459c-44c2-aa7c-a08fc2626ff8.pklz
Traceback (most recent call last):
File "/home/rzoetmulder/anaconda3/envs/nipype/lib/python2.7/site-packages/nipype/pipeline/plugins/multiproc.py", line 69, in run_node
result['result'] = node.run(updatehash=updatehash)
File "/home/rzoetmulder/anaconda3/envs/nipype/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 473, in run
result = self._run_interface(execute=True)
File "/home/rzoetmulder/anaconda3/envs/nipype/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 557, in _run_interface
return self._run_command(execute)
File "/home/rzoetmulder/anaconda3/envs/nipype/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 637, in _run_command
result = self._interface.run(cwd=outdir)
File "/home/rzoetmulder/anaconda3/envs/nipype/lib/python2.7/site-packages/nipype/interfaces/base/core.py", line 371, in run
outputs = self.aggregate_outputs(runtime)
File "/home/rzoetmulder/anaconda3/envs/nipype/lib/python2.7/site-packages/nipype/interfaces/base/core.py", line 472, in aggregate_outputs
raise error
TraitError: The trait 'vtk_surfaces' of a FIRSTOutputSpec instance is an existing file name, but the path '/mnt/e/Projects/medical-taskonomy/testdata/example_preprocess/segmentation/mapflow/_segmentation1/segmented-R_HippL_Accu_first.vtk' does not exist.

190203-13:17:08,705 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 0 jobs ready. Free memory (GB): 57.12/57.32, Free processors: 3/4.
Currently running:
* _segmentation0
190203-13:17:18,970 nipype.workflow WARNING:
[Node] Error on "_segmentation0" (/mnt/e/Projects/medical-taskonomy/testdata/example_preprocess/segmentation/mapflow/_segmentation0)
190203-13:17:20,688 nipype.workflow ERROR:
Node _segmentation0 failed to run on host 18-012665.
190203-13:17:20,691 nipype.workflow ERROR:
Saving crash info to /home/rzoetmulder/crash-20190203-131720-rzoetmulder-_segmentation0-6b6a4de0-b131-4dfe-9e1f-916d4c8c79b2.pklz
Traceback (most recent call last):
File "/home/rzoetmulder/anaconda3/envs/nipype/lib/python2.7/site-packages/nipype/pipeline/plugins/multiproc.py", line 69, in run_node
result['result'] = node.run(updatehash=updatehash)
File "/home/rzoetmulder/anaconda3/envs/nipype/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 473, in run
result = self._run_interface(execute=True)
File "/home/rzoetmulder/anaconda3/envs/nipype/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 557, in _run_interface
return self._run_command(execute)
File "/home/rzoetmulder/anaconda3/envs/nipype/lib/python2.7/site-packages/nipype/pipeline/engine/nodes.py", line 637, in _run_command
result = self._interface.run(cwd=outdir)
File "/home/rzoetmulder/anaconda3/envs/nipype/lib/python2.7/site-packages/nipype/interfaces/base/core.py", line 371, in run
outputs = self.aggregate_outputs(runtime)
File "/home/rzoetmulder/anaconda3/envs/nipype/lib/python2.7/site-packages/nipype/interfaces/base/core.py", line 472, in aggregate_outputs
raise error
TraitError: The trait 'vtk_surfaces' of a FIRSTOutputSpec instance is an existing file name, but the path '/mnt/e/Projects/medical-taskonomy/testdata/example_preprocess/segmentation/mapflow/_segmentation0/segmented-R_HippL_Accu_first.vtk' does not exist.

190203-13:17:20,704 nipype.workflow INFO:
[MultiProc] Running 0 tasks, and 0 jobs ready. Free memory (GB): 57.32/57.32, Free processors: 4/4.
190203-13:17:22,664 nipype.workflow INFO:
***********************************
190203-13:17:22,667 nipype.workflow ERROR:
could not run node: example_preprocess.segmentation
190203-13:17:22,670 nipype.workflow INFO:
crashfile: /home/rzoetmulder/crash-20190203-131708-rzoetmulder-_segmentation1-57d356fa-459c-44c2-aa7c-a08fc2626ff8.pklz
190203-13:17:22,674 nipype.workflow ERROR:
could not run node: example_preprocess.segmentation
190203-13:17:22,676 nipype.workflow INFO:
crashfile: /home/rzoetmulder/crash-20190203-131720-rzoetmulder-_segmentation0-6b6a4de0-b131-4dfe-9e1f-916d4c8c79b2.pklz
190203-13:17:22,679 nipype.workflow INFO:
***********************************

RuntimeError Traceback (most recent call last)
in ()
105 process.write_graph(graph2use='colored', format='pdf', simple_form=True)
106
--> 107 process.run('MultiProc', plugin_args={'n_procs': 4})

/home/rzoetmulder/anaconda3/envs/nipype/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']):

/home/rzoetmulder/anaconda3/envs/nipype/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

/home/rzoetmulder/anaconda3/envs/nipype/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

Actual behavior

All the other methods (canny edge detector, BET etc.) work. So my installation of FSL/Nipype should be correct.
I have set FIRST to only segment one structure namely: 'R_HippL_Accu'. It throws the error shown above, I think it just doesn't save the surface mesh in the correct folder. It doesn't work with different structures either.

I have already gone to https://miykael.github.io/nipype_tutorial/notebooks/basic_error_and_crashes.html

to figure out the crashes, though I couldn't fix it.

Script/Workflow details

Link to code

Platform details:

Using windows with linux subsystems.
Version of Linux: Ubuntu
version of windows: windows 10

Execution environment

Anaconda with jupyter lab.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions