On this page
sqlite3.InterfaceError
Prev: sqlite3.IntegrityError | Up: sqlite3 | Next: sqlite3.InternalError
Rel: sqlite3.adapt, sqlite3.Binary, sqlite3.Blob, sqlite3.complete_statement
Ref: docs.python.org โ sqlite3.InterfaceError
Tags: #public #python3 #stdlib #sqlite3
Import
import sqlite3
from sqlite3 import InterfaceError
Signature & Overview
sqlite3.InterfaceError(...)
sqlite3.InterfaceError class.
Methods & Attributes
InterfaceError.add_note(self, note, /)โ Add a note to the exceptionInterfaceError.with_traceback(self, tb, /)โ Set self.traceback to tb and return self.
Usage
import sqlite3
con = sqlite3.connect(":memory:")
try:
con.execute("SELECT ?", (object(),))
except sqlite3.InterfaceError:
assert True
finally:
con.close()
Gotchas
- Indicates a Python-to-SQLite binding mistake: Commonly raised when binding an unsupported Python object type (like a
dictor custom class without an adapter).
REPL Inspect
from sqlite3 import InterfaceError
help(InterfaceError)
Linked from
Related notes
- tuts/python3/stdlib_module/sqlite3 Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sqlite3/IntegrityError Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sqlite3/InternalError Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sqlite3/adapt Linked here; shared tags: #stdlib
- tuts/python3/stdlib_module/sqlite3/Binary Linked here; shared tags: #stdlib
- tuts/python3/stdlib_module/sqlite3/Blob Linked here; shared tags: #stdlib
- tuts/python3/stdlib_module/sqlite3/complete_statement Linked here; shared tags: #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib
- tuts/c/stdlib/assert/assert shared tags: #stdlib