airflow.exceptions

Exceptions used by Airflow

Module Contents

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: airflow.exceptions.AirflowException

Raise when the application or server cannot handle the request

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

Bases: airflow.exceptions.AirflowException, airflow.api_connexion.exceptions.NotFound

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

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

Bases: airflow.exceptions.AirflowException

Raise when there is configuration problem

exception airflow.exceptions.AirflowSensorTimeout[source]

Bases: airflow.exceptions.AirflowException

Raise when there is a timeout on sensor polling

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

Bases: airflow.exceptions.AirflowException

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

Parameters

reschedule_date (datetime.datetime) – The date when the task should be rescheduled

exception airflow.exceptions.AirflowSmartSensorException[source]

Bases: airflow.exceptions.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: airflow.exceptions.AirflowException

Raise when name of the stats is invalid

exception airflow.exceptions.AirflowTaskTimeout[source]

Bases: airflow.exceptions.AirflowException

Raise when the task execution times-out

exception airflow.exceptions.AirflowWebServerTimeout[source]

Bases: airflow.exceptions.AirflowException

Raise when the web server times out

exception airflow.exceptions.AirflowSkipException[source]

Bases: airflow.exceptions.AirflowException

Raise when the task should be skipped

exception airflow.exceptions.AirflowFailException[source]

Bases: airflow.exceptions.AirflowException

Raise when the task should be failed without retrying

exception airflow.exceptions.AirflowDagCycleException[source]

Bases: airflow.exceptions.AirflowException

Raise when there is a cycle in Dag definition

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

Bases: airflow.exceptions.AirflowException

Raise when a Dag’s ID is already used by another Dag

__str__(self)[source]
exception airflow.exceptions.AirflowClusterPolicyViolation[source]

Bases: airflow.exceptions.AirflowException

Raise when there is a violation of a Cluster Policy in Dag definition

exception airflow.exceptions.AirflowTimetableInvalid[source]

Bases: airflow.exceptions.AirflowException

Raise when a DAG has an invalid timetable.

exception airflow.exceptions.DagNotFound[source]

Bases: airflow.exceptions.AirflowNotFoundException

Raise when a DAG is not available in the system

exception airflow.exceptions.DagCodeNotFound[source]

Bases: airflow.exceptions.AirflowNotFoundException

Raise when a DAG code is not available in the system

exception airflow.exceptions.DagRunNotFound[source]

Bases: airflow.exceptions.AirflowNotFoundException

Raise when a DAG Run is not available in the system

exception airflow.exceptions.DagRunAlreadyExists[source]

Bases: airflow.exceptions.AirflowBadRequest

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

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

Bases: airflow.exceptions.AirflowBadRequest

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

exception airflow.exceptions.DuplicateTaskIdFound[source]

Bases: airflow.exceptions.AirflowException

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

exception airflow.exceptions.SerializationError[source]

Bases: airflow.exceptions.AirflowException

A problem occurred when trying to serialize a DAG

exception airflow.exceptions.TaskNotFound[source]

Bases: airflow.exceptions.AirflowNotFoundException

Raise when a Task is not available in the system

exception airflow.exceptions.TaskInstanceNotFound[source]

Bases: airflow.exceptions.AirflowNotFoundException

Raise when a Task Instance is not available in the system

exception airflow.exceptions.PoolNotFound[source]

Bases: airflow.exceptions.AirflowNotFoundException

Raise when a Pool is not available in the system

exception airflow.exceptions.NoAvailablePoolSlot[source]

Bases: airflow.exceptions.AirflowException

Raise when there is not enough slots in pool

exception airflow.exceptions.DagConcurrencyLimitReached[source]

Bases: airflow.exceptions.AirflowException

Raise when DAG max_active_tasks limit is reached

exception airflow.exceptions.TaskConcurrencyLimitReached[source]

Bases: airflow.exceptions.AirflowException

Raise when task max_active_tasks limit is reached

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

Bases: airflow.exceptions.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: typing.NamedTuple

Information about a single error in a file.

line_no :Optional[int][source]
message :str[source]
__str__(self)[source]
exception airflow.exceptions.AirflowFileParseException(msg: str, file_path: str, parse_errors: List[FileSyntaxError])[source]

Bases: airflow.exceptions.AirflowException

Raises when connection or variable file can not be parsed

Parameters
  • msg – The human-readable description of the exception

  • file_path – A processed file that contains errors

  • parse_errors – File syntax errors

__str__(self)[source]
exception airflow.exceptions.ConnectionNotUnique[source]

Bases: airflow.exceptions.AirflowException

Raise when multiple values are found for the same conn_id

exception airflow.exceptions.TaskDeferred(*, trigger, method_name: str, kwargs: Optional[Dict[str, Any]] = None, timeout: Optional[datetime.timedelta] = 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]
exception airflow.exceptions.TaskDeferralError[source]

Bases: airflow.exceptions.AirflowException

Raised when a task failed during deferral for some reason.

Was this entry helpful?