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

Absolute db paths cause sqlite3.OperationalError #2

Open
jayvdb opened this issue Mar 2, 2020 · 1 comment
Open

Absolute db paths cause sqlite3.OperationalError #2

jayvdb opened this issue Mar 2, 2020 · 1 comment

Comments

@jayvdb
Copy link

jayvdb commented Mar 2, 2020

from_uri removes any leading / in the path given, so /home/foo/blah.db becomes home/foo/blah.db which cant be opened because it is a relative path and the directories are missing.

@jayvdb
Copy link
Author

jayvdb commented Mar 8, 2020

You can see my horrible workaround at https://github.com/jayvdb/dns-cache/blob/83a3df0b9ee43339d1f928696eef1558c881997b/dns_cache/stash.py#L41

It will very likely break if this is fixed, but that is OK as it is still a new/alpha piece of software and I am not using the stash driver at the moment.

There are a few other interesting issues faced in the tests found in https://github.com/jayvdb/dns-cache/blob/93a4ae5722d3a5b78fe69f13939ea77544e70011/tests/test_persistence.py which may be of interest to you, and I will work on as I can find time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant