SQLAlchemy ORM exceptions.
sqlalchemy.orm.exc.
ConcurrentModificationError
¶alias of sqlalchemy.orm.exc.StaleDataError
sqlalchemy.orm.exc.
DetachedInstanceError
(*arg, **kw)¶An attempt to access unloaded attributes on a mapped instance that is detached.
sqlalchemy.orm.exc.
FlushError
(*arg, **kw)¶A invalid condition was detected during flush().
sqlalchemy.orm.exc.
LoaderStrategyException
(applied_to_property_type, requesting_property, applies_to, actual_strategy_type, strategy_key)¶A loader strategy for an attribute does not exist.
sqlalchemy.orm.exc.
MultipleResultsFound
(*arg, **kw)¶A single database result was required but more than one were found.
sqlalchemy.orm.exc.
NO_STATE
= (<class 'AttributeError'>, <class 'KeyError'>)¶Exception types that may be raised by instrumentation implementations.
sqlalchemy.orm.exc.
NoResultFound
(*arg, **kw)¶A database result was required but none was found.
sqlalchemy.orm.exc.
ObjectDeletedError
(base, state, msg=None)¶A refresh operation failed to retrieve the database row corresponding to an object’s known primary key identity.
A refresh operation proceeds when an expired attribute is
accessed on an object, or when Query.get()
is
used to retrieve an object which is, upon retrieval, detected
as expired. A SELECT is emitted for the target row
based on primary key; if no row is returned, this
exception is raised.
The true meaning of this exception is simply that no row exists for the primary key identifier associated with a persistent object. The row may have been deleted, or in some cases the primary key updated to a new value, outside of the ORM’s management of the target object.
sqlalchemy.orm.exc.
ObjectDereferencedError
(*arg, **kw)¶An operation cannot complete due to an object being garbage collected.
sqlalchemy.orm.exc.
StaleDataError
(*arg, **kw)¶An operation encountered database state that is unaccounted for.
Conditions which cause this to happen include:
sqlalchemy.orm.exc.
UnmappedClassError
(cls, msg=None)¶An mapping operation was requested for an unknown class.
sqlalchemy.orm.exc.
UnmappedColumnError
(*arg, **kw)¶Mapping operation was requested on an unknown column.
sqlalchemy.orm.exc.
UnmappedError
(*arg, **kw)¶Base for exceptions that involve expected mappings not present.
sqlalchemy.orm.exc.
UnmappedInstanceError
(base, obj, msg=None)¶An mapping operation was requested for an unknown instance.