Description
Summary
Hello, I'm new to nipype and I am following preprocessing tutorial in the NypypeBeginnersGuide, and I cannot seem to run the workflow or write a graph.
The workflow unzips the file, but crashes at slice timing.
The crash file created states that matlab command cannot be found, but I have matlab 2016b and SPM12 installed.
Also, the error tells that 'No command 'dot' found' when I try to write a graph.
When testing nipype with nipype.test(), a fauilure occurs in test_Commandline().
I've deleted and reinstalled nipype twice, but this problem occurred both times.
How can I resolve these issues?
Actual behavior
When trying to write a graph,
OSError Traceback (most recent call last)
in ()
1 # 7. run workflow
----> 2 pp.write_graph(graph2use='flat')
~/anaconda3/lib/python3.6/site-packages/nipype/pipeline/engine/workflows.py in write_graph(self, dotfilename, graph2use, format, simple_form)
448 dotfilename=dotfilename,
449 format=format,
--> 450 simple_form=simple_form)
451
452 logger.info(
~/anaconda3/lib/python3.6/site-packages/nipype/pipeline/engine/utils.py in export_graph(graph_in, base_dir, show, use_execgraph, show_connectinfo, dotfilename, format, simple_form)
1285
1286 # Convert .dot if format != 'dot'
-> 1287 outfname, res = _run_dot(out_dot, format_ext=format)
1288 if res is not None and res.runtime.returncode:
1289 logger.warning('dot2png: %s', res.runtime.stderr)
~/anaconda3/lib/python3.6/site-packages/nipype/pipeline/engine/utils.py in _run_dot(dotfilename, format_ext)
1328 cmd = 'dot -T{} -o"{}" "{}"'.format(format_ext, formatted_dot, dotfilename)
1329 res = CommandLine(cmd, terminal_output='allatonce',
-> 1330 resource_monitor=False).run()
1331 return formatted_dot, res
1332
~/anaconda3/lib/python3.6/site-packages/nipype/interfaces/base/core.py in run(self, cwd, **inputs)
513
514 try:
--> 515 runtime = self._run_interface(runtime)
516 outputs = self.aggregate_outputs(runtime)
517 except Exception as e:
~/anaconda3/lib/python3.6/site-packages/nipype/interfaces/base/core.py in _run_interface(self, runtime, correct_return_codes)
1011 'No command "%s" found on host %s. Please check that the '
1012 'corresponding package is installed.' % (executable_name,
-> 1013 runtime.hostname))
1014
1015 runtime.command_path = cmd_path
OSError: No command "dot" found on host Juyoungs-MacBook-Pro.local. Please check that the corresponding package is installed.
When trying to run the workflow,
180212-11:06:51,706 workflow INFO:
Workflow preprocessing settings: ['check', 'execution', 'logging', 'monitoring']
180212-11:06:51,759 workflow INFO:
Running serially.
180212-11:06:51,763 workflow INFO:
[Node] Setting-up "preprocessing.selectfiles" in "/Users/juyoungkim/D_drive/spm_study_1702/spm_practice/nipype_tutorial/wd_preprocessing/preprocessing/_session_id_run001_subject_id_sub002/selectfiles".
180212-11:06:51,785 workflow INFO:
[Node] Running "selectfiles" ("nipype.interfaces.io.SelectFiles")
180212-11:06:51,823 workflow INFO:
[Node] Finished "preprocessing.selectfiles".
180212-11:06:51,825 workflow INFO:
[Node] Setting-up "preprocessing.gunzip" in "/Users/juyoungkim/D_drive/spm_study_1702/spm_practice/nipype_tutorial/wd_preprocessing/preprocessing/_session_id_run001_subject_id_sub002/gunzip".
180212-11:06:51,834 workflow INFO:
[Node] Cached "preprocessing.gunzip" - collecting precomputed outputs
180212-11:06:51,841 workflow INFO:
[Node] "preprocessing.gunzip" found cached.
180212-11:06:51,845 workflow INFO:
[Node] Setting-up "preprocessing.slice_timing" in "/Users/juyoungkim/D_drive/spm_study_1702/spm_practice/nipype_tutorial/wd_preprocessing/preprocessing/_session_id_run001_subject_id_sub002/slice_timing".
180212-11:06:51,898 workflow INFO:
[Node] Running "slice_timing" ("nipype.interfaces.spm.preprocess.SliceTiming")
180212-11:06:51,923 workflow WARNING:
[Node] Error on "preprocessing.slice_timing" (/Users/juyoungkim/D_drive/spm_study_1702/spm_practice/nipype_tutorial/wd_preprocessing/preprocessing/_session_id_run001_subject_id_sub002/slice_timing)
180212-11:06:51,929 workflow ERROR:
Node slice_timing.a1 failed to run on host Juyoungs-MacBook-Pro.local.
180212-11:06:51,972 workflow ERROR:
Saving crash info to /Users/juyoungkim/D_drive/spm_study_1702/spm_practice/nipype_tutorial/crash-20180212-110651-juyoungkim-slice_timing.a1-bffe58c0-53dd-4946-abe8-a60895ad07c9.pklz
Traceback (most recent call last):
File "/Users/juyoungkim/anaconda3/lib/python3.6/site-packages/nipype/pipeline/plugins/linear.py", line 44, in run
node.run(updatehash=updatehash)
File "/Users/juyoungkim/anaconda3/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 487, in run
result = self._run_interface(execute=True)
File "/Users/juyoungkim/anaconda3/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 571, in _run_interface
return self._run_command(execute)
File "/Users/juyoungkim/anaconda3/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 650, in _run_command
result = self._interface.run(cwd=outdir)
File "/Users/juyoungkim/anaconda3/lib/python3.6/site-packages/nipype/interfaces/base/core.py", line 515, in run
runtime = self._run_interface(runtime)
File "/Users/juyoungkim/anaconda3/lib/python3.6/site-packages/nipype/interfaces/spm/base.py", line 359, in _run_interface
results = self.mlab.run()
File "/Users/juyoungkim/anaconda3/lib/python3.6/site-packages/nipype/interfaces/base/core.py", line 515, in run
runtime = self._run_interface(runtime)
File "/Users/juyoungkim/anaconda3/lib/python3.6/site-packages/nipype/interfaces/matlab.py", line 162, in _run_interface
runtime = super(MatlabCommand, self)._run_interface(runtime)
File "/Users/juyoungkim/anaconda3/lib/python3.6/site-packages/nipype/interfaces/base/core.py", line 1013, in _run_interface
runtime.hostname))
OSError: No command "matlab" found on host Juyoungs-MacBook-Pro.local. Please check that the corresponding package is installed.
Crash file states,
1_subject_id_sub001/slice_timing
Node inputs:
ignore_exception = False
in_files = ['/Users/juyoungkim/D_drive/spm_study_1702/spm_practice/nipype_tutorial/wd_preprocessing/preprocessing/_session_id_run001_subj
ect_id_sub001/slice_timing/run001.nii']
matlab_cmd =
mfile = True
num_slices = 40
out_prefix = a
paths =
ref_slice = 2
slice_order = [1.0, 3.0, 5.0, 7.0, 9.0, 11.0, 13.0, 15.0, 17.0, 19.0, 21.0, 23.0, 25.0, 27.0, 29.0, 31.0, 33.0, 35.0, 37.0, 39.0, 2.0, 4.
0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0, 20.0, 22.0, 24.0, 26.0, 28.0, 30.0, 32.0, 34.0, 36.0, 38.0, 40.0]
time_acquisition = 1.95
time_repetition = 2.0
use_mcr =
use_v8struct = True
Traceback:
Traceback (most recent call last):
File "/Users/juyoungkim/anaconda3/lib/python3.6/site-packages/nipype/pipeline/plugins/linear.py", line 44, in run
node.run(updatehash=updatehash)
File "/Users/juyoungkim/anaconda3/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 487, in run
result = self._run_interface(execute=True)
File "/Users/juyoungkim/anaconda3/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 571, in _run_interface
return self._run_command(execute)
File "/Users/juyoungkim/anaconda3/lib/python3.6/site-packages/nipype/pipeline/engine/nodes.py", line 650, in _run_command
result = self._interface.run(cwd=outdir)
File "/Users/juyoungkim/anaconda3/lib/python3.6/site-packages/nipype/interfaces/base/core.py", line 515, in run
runtime = self._run_interface(runtime)
File "/Users/juyoungkim/anaconda3/lib/python3.6/site-packages/nipype/interfaces/spm/base.py", line 359, in _run_interface
results = self.mlab.run()
File "/Users/juyoungkim/anaconda3/lib/python3.6/site-packages/nipype/interfaces/base/core.py", line 515, in run
runtime = self._run_interface(runtime)
File "/Users/juyoungkim/anaconda3/lib/python3.6/site-packages/nipype/interfaces/matlab.py", line 162, in _run_interface
runtime = super(MatlabCommand, self)._run_interface(runtime)
File "/Users/juyoungkim/anaconda3/lib/python3.6/site-packages/nipype/interfaces/base/core.py", line 1013, in _run_interface
runtime.hostname))
OSError: No command "matlab" found on host Juyoungs-MacBook-Pro.local. Please check that the corresponding package is installed.
Expected behavior
Write a graph and run the preprocessing workflow.
How to replicate the behavior
Script/Workflow details
Please put URL to code or code here (if not too long).
Platform details:
Please paste the output of: python -c "import nipype; print(nipype.get_info()); print(nipype.__version__)"
Execution environment
I'm running on Jupyter notebook, on Mac os, and have Nipype 1.0, MATLAB2016b and SPM12 installed.
Choose one
- Container [Tag: ???]
- My python environment inside container [Base Tag: ???]
- My python environment outside container