Skip to content

Commit 7b847b7

Browse files
committed
do not force example workflows to have inputnode.in_data
1 parent bdf8740 commit 7b847b7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

examples/fmri_spm_nested.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def _template_path(in_data):
284284
"""
285285

286286
datasource = pe.Node(nio.DataGrabber(infields=['subject_id'],
287-
outfields=['func', 'struct']),
287+
outfields=['func', 'struct']),
288288
name='datasource')
289289
datasource.inputs.template = 'nipype-tutorial/data/%s/%s.nii'
290290
datasource.inputs.template_args = info

tools/run_examples.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ def run_examples(example, pipelines, data_path, plugin=None):
3737
'stop_on_first_rerun': 'true',
3838
'write_provenance': 'true'},
3939
'logging': {'log_directory': log_dir, 'log_to_file': True}}
40-
wf.inputs.inputnode.in_data = os.path.abspath(data_path)
40+
try:
41+
wf.inputs.inputnode.in_data = os.path.abspath(data_path)
42+
except AttributeError:
43+
pass # the workflow does not have inputnode.in_data
44+
4145
wf.run(plugin=plugin, plugin_args=plugin_args)
4246
# run twice to check if nothing is rerunning
4347
wf.run(plugin=plugin)

0 commit comments

Comments
 (0)