pynenc.exceptions

Global Pynenc exception and warning classes.

Module Contents

API

exception pynenc.exceptions.PynencError[source]

Bases: Exception

Base class for all Pynenc related errors.

Initialization

Initialize self. See help(type(self)) for accurate signature.

_to_json_dict() dict[str, Any][source]
Returns:

a json serializable dictionary

classmethod _from_json_dict(json_dict: dict[str, Any]) pynenc.exceptions.PynencError[source]
Returns:

a new error from the serialized json compatible dictionary

to_json() str[source]
Returns:

the serialized error

classmethod from_json(error_name: str, serialized: str) pynenc.exceptions.PynencError[source]
Returns:

the child class from a serialized error

exception pynenc.exceptions.RetryError[source]

Bases: pynenc.exceptions.PynencError

Error raised when a task should be retried.

Initialization

Initialize self. See help(type(self)) for accurate signature.

exception pynenc.exceptions.ConcurrencyRetryError[source]

Bases: pynenc.exceptions.RetryError

Error raised when a task should be retried due to concurrency control.

Initialization

Initialize self. See help(type(self)) for accurate signature.

exception pynenc.exceptions.PendingInvocationLockError(invocation_id: str)[source]

Bases: pynenc.exceptions.PynencError

Error raised when two processes try to set the same invocation as pending concurrently

Initialization

Initialize self. See help(type(self)) for accurate signature.

exception pynenc.exceptions.TaskError(task_id: str, message: Optional[str] = None)[source]

Bases: pynenc.exceptions.PynencError

Base class for all Task related errors.

Initialization

Initialize self. See help(type(self)) for accurate signature.

__str__() str[source]
_to_json_dict() dict[str, Any][source]
Returns:

the serialized error

classmethod _from_json_dict(json_dict: dict[str, Any]) pynenc.exceptions.TaskError[source]
Returns:

the serialized error

exception pynenc.exceptions.InvalidTaskOptionsError(task_id: str, message: Optional[str] = None)[source]

Bases: pynenc.exceptions.TaskError

Error raised when the task options are invalid.

Initialization

Initialize self. See help(type(self)) for accurate signature.

exception pynenc.exceptions.TaskRoutingError(task_id: str, message: Optional[str] = None)[source]

Bases: pynenc.exceptions.TaskError

Error raised when a task will not be routed.

Initialization

Initialize self. See help(type(self)) for accurate signature.

exception pynenc.exceptions.TaskParallelProcessingError(task_id: str, message: Optional[str] = None)[source]

Bases: pynenc.exceptions.TaskError

Error parallelizing a task.

Initialization

Initialize self. See help(type(self)) for accurate signature.

exception pynenc.exceptions.InvocationConcurrencyWithDifferentArgumentsError(task_id: str, existing_invocation_id: str, new_call_id: str, diff: str, message: Optional[str] = None)[source]

Bases: pynenc.exceptions.TaskRoutingError

Error raised when there is a task with different arguments than the current task.

Initialization

Initialize self. See help(type(self)) for accurate signature.

classmethod from_call_mismatch(existing_invocation: pynenc.invocation.BaseInvocation, new_call: pynenc.call.Call, message: Optional[str] = None) pynenc.exceptions.InvocationConcurrencyWithDifferentArgumentsError[source]
static format_difference(existing_call: pynenc.call.Call, new_call: pynenc.call.Call) str[source]
__str__() str[source]
_to_json_dict() dict[str, Any][source]
Returns:

the serialized error

classmethod _from_json_dict(json_dict: dict[str, str]) pynenc.exceptions.InvocationConcurrencyWithDifferentArgumentsError[source]
Returns:

a new error from a serialized error

exception pynenc.exceptions.InvocationError(invocation_id: str, message: Optional[str] = None)[source]

Bases: pynenc.exceptions.PynencError

Base class for all Task related errors.

Initialization

Initialize self. See help(type(self)) for accurate signature.

__str__() str[source]
_to_json_dict() dict[str, Any][source]
classmethod _from_json_dict(json_dict: dict[str, Any]) pynenc.exceptions.InvocationError[source]
exception pynenc.exceptions.StateBackendError[source]

Bases: pynenc.exceptions.PynencError

Error raised when a task will not be routed.

Initialization

Initialize self. See help(type(self)) for accurate signature.

exception pynenc.exceptions.InvocationNotFoundError(invocation_id: str, message: Optional[str] = None)[source]

Bases: pynenc.exceptions.StateBackendError

Error raised when the invocation is not present in the State Backend.

Initialization

Initialize self. See help(type(self)) for accurate signature.

__str__() str[source]
_to_json_dict() dict[str, Any][source]
classmethod _from_json_dict(json_dict: dict[str, Any]) pynenc.exceptions.InvocationNotFoundError[source]
exception pynenc.exceptions.RunnerNotExecutableError[source]

Bases: pynenc.exceptions.PynencError

Raised when trying to execute a runner that is not meant to be executed.

Initialization

Initialize self. See help(type(self)) for accurate signature.

exception pynenc.exceptions.CycleDetectedError(call_ids: list[str], message: str)[source]

Bases: pynenc.exceptions.PynencError

Raised when a cycle is detected in the DependencyGraph

Initialization

Initialize self. See help(type(self)) for accurate signature.

classmethod from_cycle(cycle: list[pynenc.call.Call]) pynenc.exceptions.CycleDetectedError[source]
static _format_cycle(cycle: list[pynenc.call.Call]) str[source]
_to_json_dict() dict[str, Any][source]
classmethod _from_json_dict(json_dict: dict[str, Any]) pynenc.exceptions.CycleDetectedError[source]
exception pynenc.exceptions.RunnerError[source]

Bases: pynenc.exceptions.PynencError

Base class for all Runner related errors.

Initialization

Initialize self. See help(type(self)) for accurate signature.

exception pynenc.exceptions.ConfigError[source]

Bases: pynenc.exceptions.PynencError

Base class for all the config related errors

Initialization

Initialize self. See help(type(self)) for accurate signature.

exception pynenc.exceptions.ConfigMultiInheritanceError[source]

Bases: pynenc.exceptions.ConfigError

Error related with multiinheritance of config fields

Initialization

Initialize self. See help(type(self)) for accurate signature.

exception pynenc.exceptions.AlreadyInitializedError[source]

Bases: pynenc.exceptions.PynencError

Error raised when trying to change the class of a component after it was initialized

Initialization

Initialize self. See help(type(self)) for accurate signature.