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

Unable to specify relative path multiple levels up for db connection #671

Open
gaardhus opened this issue Aug 19, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@gaardhus
Copy link

What language are you using?

Python

What version are you using?

0.3.3

What database are you using?

sqlite

What dataframe are you using?

polars

Can you describe your bug?

When specifying a relative path as the connection string it seems to truncate some the the levels.
As such pl.read_database_uri(uri="sqlite://../../app/ainterviewer.sqlite", query="SELECT * FROM conversation") doesn't work, but moving the script one level up makes pl.read_database_uri(uri="sqlite://../app/ainterviewer.sqlite", query="SELECT * FROM conversation") work. Using the other engine for polars adbc works as expected.

Example query / code
import polars as pl
pl.read_database_uri(uri="sqlite://../../app/ainterviewer.sqlite", query="SELECT * FROM conversation")

What is the error?

[2024-08-19T10:01:40Z ERROR r2d2] unable to open database file: ../app/ainterviewer.sqlite
[2024-08-19T10:01:41Z ERROR r2d2] unable to open database file: ../app/ainterviewer.sqlite
[2024-08-19T10:01:41Z ERROR r2d2] unable to open database file: ../app/ainterviewer.sqlite
[2024-08-19T10:01:43Z ERROR r2d2] unable to open database file: ../app/ainterviewer.sqlite
[2024-08-19T10:01:46Z ERROR r2d2] unable to open database file: ../app/ainterviewer.sqlite
[2024-08-19T10:01:53Z ERROR r2d2] unable to open database file: ../app/ainterviewer.sqlite

@gaardhus gaardhus added the bug Something isn't working label Aug 19, 2024
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

1 participant