Given a SQLite table I've created, with the field in question being type TEXT, the following fails:
hsh = hashlib.sha1("".join(some_list)).hexdigest()
db_setup(hsh)
I receive the error:
InterfaceError: Error binding parameter 2 - probably unsupported type.
def db_setup(my_hash, oavals)
to_insert = (my_hash,)
('INSERT INTO position VALUES \
(null, ?, ?, null, ?, ?, ?, ?, ?)',(0, 0, to_insert,
oavals["a"], oavals["b"],
oavals["c"], oavals["d"]))
If I substitute a manual int or string (e.g. 57, or "hello" for to_insert in the db_setup def, it works fine, which leads me to believe that it's tripping over the hash, for some reason. I feel as if I'm missing something obvious here.
Table schema:
'CREATE TABLE position \
(id INTEGER PRIMARY KEY, position INTEGER, displayline INTEGER, \
header TEXT, digest TEXT, conkey TEXT, consecret TEXT, \
acckey TEXT, accsecret TEXT)'