Skip to content

Commit 157d3bd

Browse files
authored
Merge pull request #2359 from mfalkiewicz/fix_plugin_base_p3
[FIX] GraphPluginBase error in Python
2 parents 6c80289 + a29f347 commit 157d3bd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nipype/pipeline/plugins/base.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -528,15 +528,15 @@ def run(self, graph, config, updatehash=False):
528528
pyfiles = []
529529
dependencies = {}
530530
self._config = config
531-
nodes = nx.topological_sort(graph)
531+
nodes = list(nx.topological_sort(graph))
532532
logger.debug('Creating executable python files for each node')
533533
for idx, node in enumerate(nodes):
534534
pyfiles.append(
535535
create_pyscript(
536536
node, updatehash=updatehash, store_exception=False))
537537
dependencies[idx] = [
538-
nodes.index(prevnode) for prevnode in graph.predecessors(node)
539-
]
538+
nodes.index(prevnode)
539+
for prevnode in list(graph.predecessors(node))]
540540
self._submit_graph(pyfiles, dependencies, nodes)
541541

542542
def _get_args(self, node, keywords):

0 commit comments

Comments
 (0)