Skip to content

Commit 6cd32c5

Browse files
committed
Fix Windows path handling in Example 06 for SQL IMPORT DATABASE command
1 parent ac6a84b commit 6cd32c5

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

bindings/python/examples/06_vector_search_recommendations.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ def import_from_jsonl(jsonl_path, db_path):
111111
with arcadedb.create_database(str(db_path)) as db:
112112
# Import using SQL IMPORT DATABASE command
113113
abs_path = Path(jsonl_path).resolve()
114-
print(f"Importing from {abs_path}...")
115-
db.command("sql", f"IMPORT DATABASE file://{abs_path}")
114+
# Convert Windows backslashes to forward slashes for SQL URI
115+
import_path = str(abs_path).replace("\\", "/")
116+
print(f"Importing from {import_path}...")
117+
db.command("sql", f"IMPORT DATABASE file://{import_path}")
116118

117119
return time.time() - start_time
118120

0 commit comments

Comments
 (0)