This document describes the current stable version of Celery (5.2). For development docs, go here.

celery.exceptions

Celery error types.

Error Hierarchy

exception celery.exceptions.AlreadyRegistered[source]

The task is already registered.

exception celery.exceptions.AlwaysEagerIgnored[source]

send_task ignores task_always_eager option.

exception celery.exceptions.BackendError[source]

An issue writing or reading to/from the backend.

exception celery.exceptions.BackendGetMetaError(*args, **kwargs)[source]

An issue reading from the backend.

exception celery.exceptions.BackendStoreError(*args, **kwargs)[source]

An issue writing to the backend.

exception celery.exceptions.CDeprecationWarning[source]

Warning of deprecation.

exception celery.exceptions.CPendingDeprecationWarning[source]

Warning of pending deprecation.

exception celery.exceptions.CeleryCommandException(message, exit_code)[source]

A general command exception which stores an exit code.

exception celery.exceptions.CeleryError[source]

Base class for all Celery errors.

exception celery.exceptions.CeleryWarning[source]

Base class for all Celery warnings.

exception celery.exceptions.ChordError[source]

A task part of the chord raised an exception.

exception celery.exceptions.DuplicateNodenameWarning[source]

Multiple workers are using the same nodename.

exception celery.exceptions.FixupWarning[source]

Fixup related warning.

exception celery.exceptions.Ignore[source]

A task can raise this to ignore doing state updates.

exception celery.exceptions.ImproperlyConfigured[source]

Celery is somehow improperly configured.

exception celery.exceptions.IncompleteStream[source]

Found the end of a stream of data, but the data isn’t complete.

exception celery.exceptions.InvalidTaskError[source]

The task has invalid data or ain’t properly constructed.

exception celery.exceptions.MaxRetriesExceededError(*args, **kwargs)[source]

The tasks max restart limit has been exceeded.

exception celery.exceptions.NotConfigured[source]

Celery hasn’t been configured, as no config module has been found.

exception celery.exceptions.NotRegistered[source]

The task is not registered.

exception celery.exceptions.OperationalError[source]

Recoverable message transport connection error.

exception celery.exceptions.QueueNotFound[source]

Task routed to a queue not in conf.queues.

exception celery.exceptions.Reject(reason=None, requeue=False)[source]

A task can raise this if it wants to reject/re-queue the message.

exception celery.exceptions.Retry(message=None, exc=None, when=None, is_eager=False, sig=None, **kwargs)[source]

The task is to be retried later.

exc = None

Exception (if any) that caused the retry to happen.

humanize()[source]
message = None

Optional message describing context of retry.

when = None

Time of retry (ETA), either numbers.Real or datetime.

exception celery.exceptions.SecurityError[source]

Security related exception.

exception celery.exceptions.SecurityWarning[source]

Potential security issue found.

exception celery.exceptions.SoftTimeLimitExceeded[source]

The soft time limit has been exceeded. This exception is raised to give the task a chance to clean up.

exception celery.exceptions.TaskError[source]

Task related errors.

exception celery.exceptions.TaskPredicate[source]

Base class for task-related semi-predicates.

exception celery.exceptions.TaskRevokedError[source]

The task has been revoked, so no result available.

exception celery.exceptions.Terminated[source]

The worker processing a job has been terminated by user request.

exception celery.exceptions.TimeLimitExceeded[source]

The time limit has been exceeded and the job has been terminated.

exception celery.exceptions.TimeoutError[source]

The operation timed out.

exception celery.exceptions.WorkerLostError[source]

The worker processing a job has exited prematurely.

exception celery.exceptions.WorkerShutdown[source]

Signals that the worker should perform a warm shutdown.

exception celery.exceptions.WorkerTerminate[source]

Signals that the worker should terminate immediately.

celery.exceptions.reraise(tp, value, tb=None)[source]

Reraise exception.