python icon indicating copy to clipboard operation
python copied to clipboard

Using a sqlite database fails

Open jjguti opened this issue 1 year ago • 0 comments

I am trying to use the url "sqlite:///db/filename.db"(three forward slashes) to mean the file "/db/filename.db" in the config.yaml of a python bridge (googlechat). This doesn't work, and after a bit of debugging I realized that it should be written with four forward slashes (sqlite:////db/filename.db)

These two lines seem to handle this bit:

https://github.com/mautrix/python/blob/0b674872c228f70b41d6443f665515caee828463/mautrix/util/async_db/aiosqlite.py#L107-L108

I am wondering if this is a bug or expected and if the latter, maybe the documentation on the preceding lines should be updated/clarified.

This is on docker, btw. Since on docker the working directory is not writable, I would guess the most common use case would be to write an absolute path to a volume (i e /db/something.db).

jjguti avatar Apr 04 '23 11:04 jjguti