Skip to main content

Errors

All exceptions raised by the client inherit from readie.ReadieError. They fall into three groups: setup and usage errors, transport errors (TransportError), and execution errors (ExecutionError).

Setup and usage​

These errors indicate invalid configuration or incorrect use of the client.

ExceptionConditionAction
IncompatiblePythonErrorA Client is created on a Python version other than 3.12.Use Python 3.12.
ConfigurationErrorSettings or a budget is invalid: a non-positive timeout or chunk_size, an unparseable or negative size, or max_memory below memory. Raised at construction or decoration.Correct the value.
InvalidPackageErrorA packages= entry is not a valid requirement. Subclass of ConfigurationError.Correct the spelling or version specifier.
SerializationErrorThe call cannot be pickled, or the result cannot be unpickled.Remove unpicklable objects from the function or its arguments, and confirm that Python and library versions match.
ClientClosedErrorA closed Client or Session is used.Create a new instance.
BlockingCallInEventLoopErrorA blocking call is made while an event loop is running.Use await fn.aio(...).

Transport errors​

A TransportError indicates that the call did not complete because of the router or the network. Each transport error has a code attribute that holds the gRPC status name.

ExceptiongRPC statusConditionAction
ClusterUnavailableErrorUNAVAILABLEThe service is unreachable or no worker is available.Retry later.
RemoteTimeoutErrorDEADLINE_EXCEEDEDThe timeout passed.Raise or remove timeout.
InvalidRequestErrorINVALID_ARGUMENT, FAILED_PRECONDITION, OUT_OF_RANGEThe router or worker rejected the request. The cases are disable_optimized_execution=True on a session already restored from a snapshot, a checkpoint_id that the router does not list (INVALID_ARGUMENT) or that differs from the snapshot the session runs on (FAILED_PRECONDITION), an invalid packages= requirement (INVALID_ARGUMENT), and a failed packages= install (FAILED_PRECONDITION).Correct the request. For a failed install, read the log lines that precede the exception.
ResourceExhaustedErrorRESOURCE_EXHAUSTEDNo worker has room, a session's queue wait exceeded 60 s (router default), or a message was too large.Retry later, or use more sessions.
ExecutionCancelledErrorCANCELLEDThe call was cancelled.Retry if the cancellation was unintended.
PermissionDeniedErrorPERMISSION_DENIED, UNAUTHENTICATEDThe auth token is missing or wrong.Set READIE_AUTH_TOKEN.
SessionExpiredErrorNOT_FOUNDThe session existed, but its sandbox is gone.Open a new session. Session state is lost.
TransportErrorAny other statusAny other failure, including INTERNAL.Retry. If the error persists, contact the operator.

Execution errors​

An ExecutionError indicates that the call ran but produced no usable result. These errors carry logs (a tuple of output lines), worker_id, and container_id. The message includes the last 40 log lines.

ExceptionConditionAction
RemoteExecutionErrorThe function raised, or the worker marked the run as failed. Has the attributes remote_type, remote_message, and remote_traceback.Read the traceback.
EmptyResultErrorThe worker sent no result, or sent something that is not a result envelope, for example from an executor that speaks an older protocol. A function that returns None does not raise this error.Check logs and consider a larger memory value. If the error repeats, report it to the operator.

See also​