Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dowhy/causal_identifier/id_identifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def identify_effect_id(

try:
tsort_node_names = OrderedSet(list(nx.topological_sort(graph))) # topological sorting of graph nodes
except:
except nx.NetworkXUnfeasible:
raise Exception("The graph must be a directed acyclic graph (DAG).")

return __adjacency_matrix_identify_effect(
Expand Down
2 changes: 1 addition & 1 deletion dowhy/utils/graph_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def find_predecessor(i, j, g):
try:
path = shortest_path(u, pa, i)
return pa
except:
except nx.NetworkXNoPath:
pass
return None

Expand Down
Loading