all Python 3sqlite3exception
sqlite3.NotSupportedError
exceptions
Raised when a method or database API is not supported by the underlying SQLite library (e.g. deterministic=True in create_function); a subclass of sqlite3.DatabaseError.
Syntax
sqlite3.NotSupportedError
The key point: whether a feature exists depends on the SQLite library your interpreter was built against, not on the Python version — the same code can run fine on your machine and fail on a colleague's or in CI. Check sqlite3.sqlite_version (the engine's own version string) before relying on newer features, and treat this exception as "capability missing, take the fallback path" rather than as a data error.
Examples
import sqlite3
print(issubclass(sqlite3.NotSupportedError, sqlite3.DatabaseError)) # → True
print(sqlite3.NotSupportedError.__name__) # → NotSupportedError
print(sqlite3.NotSupportedError.__mro__[2].__name__) # → Error
try: raise sqlite3.NotSupportedError('deterministic=True не поддержан')
except sqlite3.Error as e: print(type(e).__name__) # → NotSupportedError
See also
Open in the full glossarydocs.python.orgReport an inaccuracy