db: Set check_same_thread=False

Apparently, the about-to-finish signal is called in a different thread
than the main thread. SQLite complains about the connection getting used
from a different thread, so we need to set this check to False so the
code skips it.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2021-11-20 17:03:18 -05:00
parent 688bd1aa29
commit b4daf0e48c
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ import sqlite3
File = lib.data.emmental_data / "emmental.sqlite"
Connection = sqlite3.connect(File, detect_types=sqlite3.PARSE_DECLTYPES)
Connection = sqlite3.connect(File, detect_types=sqlite3.PARSE_DECLTYPES, check_same_thread=False)
Connection.row_factory = sqlite3.Row
commit = Connection.commit