sqlite Windows path to DB file #401
Answered
by
wangxiaoying
wKollendorf
asked this question in
Q&A
-
Hello, am trying to connect to an sqlite DB on a Windows machine (python3):
But it gives me following error message:
Tried it with relative path, unicode encoding. What I am missing? |
Beta Was this translation helpful? Give feedback.
Answered by
wangxiaoying
Nov 17, 2022
Replies: 2 comments 1 reply
-
Have you tried to urlencode the path? Like this: import urllib
path = urllib.parse.quote("C:\\Users\\somepath\\test.sqlite")
df = cx.read_sql(f"sqlite://{path}", query) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
wKollendorf
-
Alternatively use triple slahes and forward slashes:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you tried to urlencode the path? Like this: