jina.excepts module#

This modules defines all kinds of exceptions raised in Jina.

exception jina.excepts.BaseJinaException[source]#

Bases: BaseException

A base class for all exceptions raised by Jina

args#
with_traceback()#

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

exception jina.excepts.RuntimeFailToStart[source]#

Bases: SystemError, jina.excepts.BaseJinaException

When pod/deployment is failed to started.

args#
with_traceback()#

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

exception jina.excepts.RuntimeTerminated[source]#

Bases: KeyboardInterrupt, jina.excepts.BaseJinaException

The event loop of BasePod ends.

args#
with_traceback()#

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

exception jina.excepts.FlowTopologyError[source]#

Bases: Exception, jina.excepts.BaseJinaException

Flow exception when the topology is ambiguous.

args#
with_traceback()#

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

exception jina.excepts.FlowMissingDeploymentError[source]#

Bases: Exception, jina.excepts.BaseJinaException

Flow exception when a deployment can not be found in the flow.

args#
with_traceback()#

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

exception jina.excepts.FlowBuildLevelError[source]#

Bases: Exception, jina.excepts.BaseJinaException

Flow exception when required build level is higher than the current build level.

args#
with_traceback()#

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

exception jina.excepts.BadConfigSource[source]#

Bases: FileNotFoundError, jina.excepts.BaseJinaException

The yaml config file is bad, not loadable or not exist.

args#
characters_written#
errno#

POSIX exception code

filename#

exception filename

filename2#

second exception filename

strerror#

exception strerror

with_traceback()#

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

exception jina.excepts.BadClient[source]#

Bases: Exception, jina.excepts.BaseJinaException

A wrongly defined client, can not communicate with jina server correctly.

args#
with_traceback()#

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

exception jina.excepts.BadServer[source]#

Bases: Exception, jina.excepts.BaseJinaException

Error happens on the server side.

args#
with_traceback()#

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

exception jina.excepts.BadClientCallback[source]#

Bases: jina.excepts.BadClient, jina.excepts.BaseJinaException

Error in the callback function on the client side.

args#
with_traceback()#

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

exception jina.excepts.BadClientInput[source]#

Bases: jina.excepts.BadClient, jina.excepts.BaseJinaException

Error in the request generator function on the client side.

args#
with_traceback()#

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

exception jina.excepts.BadRequestType[source]#

Bases: TypeError, jina.excepts.BaseJinaException

Exception when can not construct a request object from given data.

args#
with_traceback()#

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

exception jina.excepts.BadImageNameError[source]#

Bases: Exception, jina.excepts.BaseJinaException

Exception when an image name can not be found either local & remote

args#
with_traceback()#

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

exception jina.excepts.BadYAMLVersion[source]#

Bases: Exception, jina.excepts.BaseJinaException

Exception when YAML config specifies a wrong version number.

args#
with_traceback()#

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

exception jina.excepts.NotSupportedError[source]#

Bases: Exception, jina.excepts.BaseJinaException

Exception when user accidentally using a retired argument.

args#
with_traceback()#

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

exception jina.excepts.RuntimeRunForeverEarlyError[source]#

Bases: Exception, jina.excepts.BaseJinaException

Raised when an error occurs when starting the run_forever of Runtime

args#
with_traceback()#

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

exception jina.excepts.DockerVersionError[source]#

Bases: SystemError, jina.excepts.BaseJinaException

Raised when the docker version is incompatible

args#
with_traceback()#

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

exception jina.excepts.NoContainerizedError[source]#

Bases: Exception, jina.excepts.BaseJinaException

Raised when trying to use non-containerized Executor in K8s or Docker Compose

args#
with_traceback()#

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

exception jina.excepts.PortAlreadyUsed[source]#

Bases: RuntimeError, jina.excepts.BaseJinaException

Raised when to use a port which is already used

args#
with_traceback()#

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

exception jina.excepts.InternalNetworkError(og_exception, request_id='', dest_addr={''}, details='')[source]#

Bases: grpc.aio._call.AioRpcError, jina.excepts.BaseJinaException

Raised when communication between microservices fails. Needed to propagate information about the root cause event, such as request_id and dest_addr.

Parameters
  • og_exception (AioRpcError) – the original exception that caused the network error

  • request_id (str) – id of the request that caused the error

  • dest_addr (Union[str, Set[str]]) – destination (microservice) address(es) of the problematic network call(s)

  • details (str) – details of the error

code()[source]#
Returns

error code of this exception

details()[source]#
Returns

details of this exception

args#
debug_error_string()#

Accesses the debug error string sent by the server.

Returns:

The debug error string received.

Return type

str

initial_metadata()#

Accesses the initial metadata sent by the server.

Returns:

The initial metadata received.

Return type

Metadata

trailing_metadata()#

Accesses the trailing metadata sent by the server.

Returns:

The trailing metadata received.

Return type

Metadata

with_traceback()#

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