I\'m trying this code:
import sqlite
connection = sqlite.connect(\'cache.db\')
cur = connection.cursor()
cur.execute(\'\'\'create table item
(id integer p
I'm presuming you are actually using sqlite3 even though your code says otherwise. Here are some things to check:
$ fuser cache.db
should say nothing)$ sqlite3 cache.db "pragma integrity_check;"
$ sqlite3 cache.db ".backup cache.db.bak"
$ sqlite3 cache.db.bak ".schema"
Failing that, read Things That Can Go Wrong and How to Corrupt Your Database Files
Set the timeout parameter in your connect call, as in:
connection = sqlite.connect('cache.db', timeout=10)