summaryrefslogtreecommitdiff
path: root/backend/src/graph.py
diff options
context:
space:
mode:
Diffstat (limited to 'backend/src/graph.py')
-rw-r--r--backend/src/graph.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/backend/src/graph.py b/backend/src/graph.py
index 31eef80..9e4534a 100644
--- a/backend/src/graph.py
+++ b/backend/src/graph.py
@@ -300,6 +300,7 @@ class NavigationGraph:
else:
logger.info("Generating path lengths and caching to file")
dist = dict(nx.all_pairs_dijkstra_path_length(self.graph))
+ PATHS_FILE.parent.mkdir(parents=True, exist_ok=True)
with PATHS_FILE.open("wb") as f:
pickle.dump(dist, f)
return dist