Skip to content

Commit 7306d54

Browse files
authored
Merge pull request #1944 from mgxd/fix/wfgraph
FIX: catch write_graph errors for 'hierarchical/colored
2 parents 7b3fffc + d4c5ffb commit 7306d54

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

nipype/pipeline/engine/workflows.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,9 @@ def write_graph(self, dotfilename='graph.dot', graph2use='hierarchical',
425425
base_dir = os.getcwd()
426426
base_dir = make_output_dir(base_dir)
427427
if graph2use in ['hierarchical', 'colored']:
428+
if self.name[:1].isdigit(): # these graphs break if int
429+
raise ValueError('{} graph failed, workflow name cannot begin '
430+
'with a number'.format(graph2use))
428431
dotfilename = op.join(base_dir, dotfilename)
429432
self.write_hierarchical_dotfile(dotfilename=dotfilename,
430433
colored=graph2use == "colored",

0 commit comments

Comments
 (0)