module tarantool.error

Python DB API compatible exceptions, see PEP-249.

exception tarantool.error.ClusterConnectWarning

Warning related to cluster pool connection.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.ClusterDiscoveryWarning

Warning related to cluster discovery.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.ConfigurationError

Error of initialization with a user-provided configuration.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.CrudModuleError(_, error)

Exception raised for errors that are related to the operation result of crud module.

Sets fields with result and errors.

Parameters:

args (tuple) – The tuple from the crud module with result and errors.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.CrudModuleManyError(success, error)

Exception raised for errors that are related to the batching operation result of crud module.

Sets fields with result and errors.

Parameters:

args (tuple) – The tuple from the crud module with result and errors.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.DataError(*args, extra_info=None)

Exception raised for errors that are due to problems with the processed data like division by zero, numeric value out of range, etc.

Parameters:
  • args (tuple) – (code, message) or (message,).

  • extra_info (BoxError or None, optional) – Additional box.error information with backtrace.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.DatabaseError(*args, extra_info=None)

Exception raised for errors that are related to the database.

Parameters:
  • args (tuple) – (code, message) or (message,).

  • extra_info (BoxError or None, optional) – Additional box.error information with backtrace.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.Error

Base class for error exceptions.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.IntegrityError(*args, extra_info=None)

Exception raised when the relational integrity of the database is affected, e.g. a foreign key check fails.

Parameters:
  • args (tuple) – (code, message) or (message,).

  • extra_info (BoxError or None, optional) – Additional box.error information with backtrace.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.InterfaceError

Exception raised for errors that are related to the database interface rather than the database itself.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.InternalError(*args, extra_info=None)

Exception raised when the database encounters an internal error, e.g. the cursor is not valid anymore, the transaction is out of sync, etc.

Parameters:
  • args (tuple) – (code, message) or (message,).

  • extra_info (BoxError or None, optional) – Additional box.error information with backtrace.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.MsgpackError

Error with encoding or decoding of MP_EXT types.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.MsgpackWarning

Warning with encoding or decoding of MP_EXT types.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.NetworkError(*args, **kwargs)

Error related to network.

Parameters:
  • args (dict, optional) – Exception arguments. If the first argument is a socket exception, it is wrapped.

  • kwargs – Exception to wrap.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.NetworkWarning

Warning related to network.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.NotSupportedError(*args, extra_info=None)

Exception raised in case a method or database API was used which is not supported by the database, e.g. requesting a .rollback() on a connection that does not support transactions or has transactions turned off.

Parameters:
  • args (tuple) – (code, message) or (message,).

  • extra_info (BoxError or None, optional) – Additional box.error information with backtrace.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.OperationalError(*args, extra_info=None)

Exception raised for errors that are related to the database’s operation and not necessarily under the control of the programmer, e.g. an unexpected disconnect occurs, the data source name is not found, a transaction could not be processed, a memory allocation error occurred during processing, etc.

Parameters:
  • args (tuple) – (code, message) or (message,).

  • extra_info (BoxError or None, optional) – Additional box.error information with backtrace.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.PoolTolopogyError(*args, extra_info=None)

Exception raised due to unsatisfying box.info.ro state of pool instances.

Parameters:
  • args (tuple) – (code, message) or (message,).

  • extra_info (BoxError or None, optional) – Additional box.error information with backtrace.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.PoolTolopogyWarning

Warning related to unsatisfying box.info.ro state of pool instances.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.ProgrammingError(*args, extra_info=None)

Exception raised when the database encounters an internal error, e.g. the cursor is not valid anymore, the transaction is out of sync, etc.

Parameters:
  • args (tuple) – (code, message) or (message,).

  • extra_info (BoxError or None, optional) – Additional box.error information with backtrace.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.SchemaError(value)

Error related to extracting space and index schema.

Parameters:

value – Error value.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.SchemaReloadException(message, schema_version)

Error related to outdated space and index schema.

Parameters:
  • message (str) – Error message.

  • schema_version (int) – Response schema version.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception tarantool.error.SslError(*args, **kwargs)

Error related to SSL.

Parameters:
  • args (dict, optional) – Exception arguments. If the first argument is a socket exception, it is wrapped.

  • kwargs – Exception to wrap.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

tarantool.error.tnt_strerror(num)

Parse Tarantool error to string data.

Parameters:

num (int) – Tarantool error code.

Returns:

Tuple (ER_NAME, message) or "UNDEFINED".

Return type:

tuple or str

tarantool.error.warn(message, warning_class)

Emit a warning message. Just like standard warnings.warn() but don’t output full filename.

Parameters:
  • message (str) – Warning message.

  • warning_class (Warning) – Warning class.