airflow.exceptions

Exceptions used by Airflow

Module Contents

Classes

FileSyntaxError

Information about a single error in a file.

exception airflow.exceptions.AirflowException[source]

Bases: Exception

Base class for all Airflow's errors.

Each custom exception should be derived from this class.

status_code = 500[source]
exception airflow.exceptions.AirflowBadRequest[source]

Bases: AirflowException

Raise when the application or server cannot handle the request.

status_code = 400[source]
exception airflow.exceptions.AirflowNotFoundException[source]

Bases: AirflowException

Raise when the requested object/resource is not available in the system.

status_code = 404[source]
exception airflow.exceptions.AirflowConfigException[source]

Bases: AirflowException

Raise when there is configuration problem.

exception airflow.exceptions.AirflowSensorTimeout[source]

Bases: AirflowException

Raise when there is a timeout on sensor polling.

exception airflow.exceptions.AirflowRescheduleException(reschedule_date)[source]

Bases: AirflowException

Raise when the task should be re-scheduled at a later time.

Parameters

reschedule_date -- The date when the task should be rescheduled

exception airflow.exceptions.AirflowSmartSensorException[source]

Bases: AirflowException

Raise after the task register itself in the smart sensor service.

It should exit without failing a task.

exception airflow.exceptions.InvalidStatsNameException[source]

Bases: AirflowException

Raise when name of the stats is invalid.

exception airflow.exceptions.AirflowTaskTimeout[source]

Bases: AirflowException

Raise when the task execution times-out.

exception airflow.exceptions.AirflowWebServerTimeout[source]

Bases: AirflowException

Raise when the web server times out.

exception airflow.exceptions.AirflowSkipException[source]

Bases: AirflowException

Raise when the task should be skipped

exception airflow.exceptions.AirflowFailException[source]

Bases: AirflowException

Raise when the task should be failed without retrying.

exception airflow.exceptions.AirflowOptionalProviderFeatureException[source]

Bases: AirflowException

Raise by providers when imports are missing for optional provider features.

exception airflow.exceptions.UnmappableOperator[source]

Bases: AirflowException

Raise when an operator is not implemented to be mappable.

exception airflow.exceptions.XComForMappingNotPushed[source]

Bases: AirflowException

Raise when a mapped downstream's dependency fails to push XCom for task mapping.

__str__(self)[source]

Return str(self).

exception airflow.exceptions.UnmappableXComTypePushed(value)[source]

Bases: AirflowException

Raise when an unmappable type is pushed as a mapped downstream's dependency.

__str__(self)[source]

Return str(self).

exception airflow.exceptions.UnmappableXComLengthPushed(value, max_length)[source]

Bases: AirflowException

Raise when the pushed value is too large to map as a downstream's dependency.

__str__(self)[source]

Return str(self).

exception airflow.exceptions.AirflowDagCycleException[source]

Bases: AirflowException

Raise when there is a cycle in DAG definition.

exception airflow.exceptions.AirflowDagDuplicatedIdException(dag_id, incoming, existing)[source]

Bases: AirflowException

Raise when a DAG's ID is already used by another DAG.

__str__(self)[source]

Return str(self).

exception airflow.exceptions.AirflowClusterPolicyViolation[source]

Bases: AirflowException

Raise when there is a violation of a Cluster Policy in DAG definition.

exception airflow.exceptions.AirflowTimetableInvalid[source]

Bases: AirflowException

Raise when a DAG has an invalid timetable.

exception airflow.exceptions.DagNotFound[source]

Bases: AirflowNotFoundException

Raise when a DAG is not available in the system.

exception airflow.exceptions.DagCodeNotFound[source]

Bases: AirflowNotFoundException

Raise when a DAG code is not available in the system.

exception airflow.exceptions.DagRunNotFound[source]

Bases: AirflowNotFoundException

Raise when a DAG Run is not available in the system.

exception airflow.exceptions.DagRunAlreadyExists[source]

Bases: AirflowBadRequest

Raise when creating a DAG run for DAG which already has DAG run entry.

exception airflow.exceptions.DagFileExists(*args, **kwargs)[source]

Bases: AirflowBadRequest

Raise when a DAG ID is still in DagBag i.e., DAG file is in DAG folder.

exception airflow.exceptions.DuplicateTaskIdFound[source]

Bases: AirflowException

Raise when a Task with duplicate task_id is defined in the same DAG.

exception airflow.exceptions.SerializationError[source]

Bases: AirflowException

A problem occurred when trying to serialize a DAG.

exception airflow.exceptions.ParamValidationError[source]

Bases: AirflowException

Raise when DAG params is invalid

exception airflow.exceptions.TaskNotFound[source]

Bases: AirflowNotFoundException

Raise when a Task is not available in the system.

exception airflow.exceptions.TaskInstanceNotFound[source]

Bases: AirflowNotFoundException

Raise when a task instance is not available in the system.

exception airflow.exceptions.PoolNotFound[source]

Bases: AirflowNotFoundException

Raise when a Pool is not available in the system.

exception airflow.exceptions.NoAvailablePoolSlot[source]

Bases: AirflowException

Raise when there is not enough slots in pool.

exception airflow.exceptions.DagConcurrencyLimitReached[source]

Bases: AirflowException

Raise when DAG max_active_tasks limit is reached.

exception airflow.exceptions.TaskConcurrencyLimitReached[source]

Bases: AirflowException

Raise when task max_active_tasks limit is reached.

exception airflow.exceptions.BackfillUnfinished(message, ti_status)[source]

Bases: AirflowException

Raises when not all tasks succeed in backfill.

Parameters
  • message -- The human-readable description of the exception

  • ti_status -- The information about all task statuses

class airflow.exceptions.FileSyntaxError[source]

Bases: NamedTuple

Information about a single error in a file.

line_no :Optional[int][source]
message :str[source]
__str__(self)[source]

Return str(self).

exception airflow.exceptions.AirflowFileParseException(msg, file_path, parse_errors)[source]

Bases: AirflowException

Raises when connection or variable file can not be parsed.

Parameters
  • msg (str) -- The human-readable description of the exception

  • file_path (str) -- A processed file that contains errors

  • parse_errors (List[FileSyntaxError]) -- File syntax errors

__str__(self)[source]

Return str(self).

exception airflow.exceptions.ConnectionNotUnique[source]

Bases: AirflowException

Raise when multiple values are found for the same connection ID.

exception airflow.exceptions.TaskDeferred(*, trigger, method_name, kwargs=None, timeout=None)[source]

Bases: BaseException

Special exception raised to signal that the operator it was raised from wishes to defer until a trigger fires.

__repr__(self)[source]

Return repr(self).

exception airflow.exceptions.TaskDeferralError[source]

Bases: AirflowException

Raised when a task failed during deferral for some reason.

Was this entry helpful?