In pysqlite you must close the cursor before closing the connection, even if you already commited the cursor.
Categories: Error