From aa4ec8acd5d2155f91bd3a14fc71aa028e7ab973 Mon Sep 17 00:00:00 2001 From: Saugat Pachhai Date: Tue, 15 Dec 2020 16:34:39 +0545 Subject: [PATCH] Skip building graph for dependencies without path_info (#5103) RepoDependency for example don't have any path_info See: https://github.com/iterative/dvc/pull/4938#issuecomment-743709176 Related: #5035 --- dvc/repo/graph.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dvc/repo/graph.py b/dvc/repo/graph.py index 024e633b0..d9286b00d 100644 --- a/dvc/repo/graph.py +++ b/dvc/repo/graph.py @@ -136,6 +136,9 @@ def build_outs_graph(graph, outs_trie): G.add_nodes_from(outs_trie.values()) for stage in graph.nodes(): for dep in stage.deps: + if dep.path_info is None: + # RepoDependency don't have a path_info + continue dep_key = dep.path_info.parts overlapping = [n.value for n in outs_trie.prefixes(dep_key)] if outs_trie.has_subtrie(dep_key):