holonote icon indicating copy to clipboard operation
holonote copied to clipboard

SQLite objects created in a thread can only be used in that same thread

Open hoxbro opened this issue 11 months ago • 0 comments

When running the connector in a panel app with panel serve --num-threads 2 app.py, I got the following error: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 139771783407360 and this is thread id 139771770820352

This should be possible to use an annotator across multiple threads. There is an option to disable this warning with check_same_thread ref. Though I'm leaning towards always creating a new connection when using the database to also avoid sqlite is in use errors.

hoxbro avatar Jul 13 '23 09:07 hoxbro