dbapi_connection.close() sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 140159832004352 and this is thread id 140159412565760. code example
Example: sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread
conn = sqlite3.connect('your.db', check_same_thread=False)