2shady4u / godot-sqlite

GDExtension wrapper for SQLite (Godot 4.x+)
MIT License
973 stars 83 forks source link

GDSQLite Error: Can't open specified json-file, file does not exist or is locked #192

Open BravoNiceCatch opened 2 weeks ago

BravoNiceCatch commented 2 weeks ago

Environment:

Issue description: Export to JSON file failed.

Steps to reproduce: Create a JSON file at the path res://player.json and a database file at the path res://test_data.db. The code only contains the following:

func _ready() -> void:
    database = SQLite.new()
    database.path = "res://test_data.db"
    database.open_db()
    database.export_to_json("res://player.json")

However, an error occurs: GDSQLite Error: Can't open specified json-file, file does not exist or is locked, and the export was unsuccessful.

Strangely, when I export it as an .exe file, there's no error, and it successfully exports to the JSON file.

Minimal reproduction project: Only the code snippet above is needed.

Additional context