From 1e7ddc7e0b7ea697119c1aa5d263145f837bea49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Tue, 15 Dec 2020 15:08:21 +0545 Subject: [PATCH] Skip building graph for dependencies without path_info 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 024e633b01..d9286b00dd 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):