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

Fix the sql OperationalError bug #210

Merged
merged 13 commits into from
Nov 25, 2024
2 changes: 1 addition & 1 deletion dooit/api/_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

ROOT_FOLDER = Path(user_data_dir("dooit"))
DATABASE_FILE = ROOT_FOLDER / "dooit.db"
DATABASE_CONN_STRING = f"sqlite:////{DATABASE_FILE}"
DATABASE_CONN_STRING = f"sqlite:///{DATABASE_FILE}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm..it does work normally without the extra / but what about the OperationalError? How do I reproduce it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was specific to windows. Nice catch!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it seems to be windows-specific.


DATABASE_FILE.parent.mkdir(parents=True, exist_ok=True)
Loading