From 2c6d60494ad62243ff5ef7969c8d48db3d45b19a Mon Sep 17 00:00:00 2001 From: vasilije Date: Sun, 13 Jul 2025 22:02:02 +0200 Subject: [PATCH] added fixes for missing database path --- cognee/infrastructure/databases/graph/kuzu/adapter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cognee/infrastructure/databases/graph/kuzu/adapter.py b/cognee/infrastructure/databases/graph/kuzu/adapter.py index 05436f7c2..30e13701b 100644 --- a/cognee/infrastructure/databases/graph/kuzu/adapter.py +++ b/cognee/infrastructure/databases/graph/kuzu/adapter.py @@ -48,7 +48,9 @@ class KuzuAdapter(GraphDBInterface): try: # For Kuzu v0.11.0+, create parent directory but use db_path as file parent_dir = os.path.dirname(self.db_path) - os.makedirs(parent_dir, exist_ok=True) + # Only create directory if parent_dir is not empty (i.e., db_path has a directory component) + if parent_dir: + os.makedirs(parent_dir, exist_ok=True) self.db = Database(self.db_path) self.db.init_database()