Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
BravoNiceCatch opened this issue Nov 7, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@BravoNiceCatch
Copy link

Environment:

  • OS: Windows
  • Godot version: 4.3
  • godot-sqlite version: 4.4

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

@BravoNiceCatch BravoNiceCatch added the bug Something isn't working label Nov 7, 2024
@2shady4u
Copy link
Owner

Hello @BravoNiceCatch,

I am trying to replicate the issue, but I fail to get the same error to appear on my end.
The snippet you shared runs without issue on my end.

Is there any missing information that might help?

  • Do you have another process that is locking the player.json-file in some way?
  • ...any other information :)

@2shady4u
Copy link
Owner

Note to future self:
Maybe add a call to std::perror("Error"); to get better understanding of what went wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants