airflow.exceptions¶
Exceptions used by Airflow.
Exceptions¶
Base class for all Airflow's errors. |
|
Raise when the application or server cannot handle the request. |
|
Raise when the requested object/resource is not available in the system. |
|
Raise when there is configuration problem. |
|
Raise when there is a timeout on sensor polling. |
|
Raise when the task should be re-scheduled at a later time. |
|
Raise when name of the stats is invalid. |
|
Raise when the task execution times-out. |
|
Raise when the task execution is terminated. |
|
Raise when the task should be skipped. |
|
Raise when the task should be failed without retrying. |
|
Raise when the task is executed with inactive assets in its inlet or outlet. |
|
Raise by providers when imports are missing for optional provider features. |
|
Raise when an XCom reference is being resolved against a non-existent XCom. |
|
Raise when a DAG's ID is already used by another DAG. |
|
Raise when there is a violation of a Cluster Policy in DAG definition. |
|
Raise when skipping dag is needed in Cluster Policy. |
|
Raise for a Cluster Policy other than AirflowClusterPolicyViolation or AirflowClusterPolicySkipDag. |
|
Raise when a DAG has an invalid timetable. |
|
Raise when a DAG is not available in the system. |
|
Raise when a DAG code is not available in the system. |
|
Raise when a DAG Run is not available in the system. |
|
Raise when creating a DAG run for DAG which already has DAG run entry. |
|
Raise when a Task with duplicate task_id is defined in the same DAG. |
|
Raise when a Task cannot be added to a TaskGroup since it already belongs to another TaskGroup. |
|
A problem occurred when trying to serialize something. |
|
Raise when DAG params is invalid. |
|
Raise when a Task is not available in the system. |
|
Raise when a task instance is not available in the system. |
|
Raise if a task is neither mapped nor has any parent mapped groups. |
|
Raise when a Pool is not available in the system. |
|
Raises when connection or variable file can not be parsed. |
|
Raise when a file type is not supported. |
|
Raise when multiple values are found for the same connection ID. |
|
Raise when multiple values are found for the same variable name. |
|
Signal by an operator to skip its downstream tasks. |
|
Signal by an operator to trigger a specific Dag Run of a dag. |
|
Signal an operator moving to deferred state. |
|
Raised when a task failed during deferral for some reason. |
|
Raise when there is a timeout on the deferral. |
|
Raised when exception happens during Pod Mutation Hook execution. |
|
Raised when an error is encountered while trying to merge pod configs. |
|
Issued for usage of deprecated features that will be removed in Airflow4. |
|
Issued for usage of deprecated features of Airflow provider. |
|
Raised when an error is encountered while a pickling library deserializes a pickle file. |
|
Raised when an attempt is made to load an executor which is not configured. |
|
Raised when a Dag cannot be deserialized. |
Classes¶
Information about a single error in a file. |
Functions¶
|
Provide backward compatibility for moved exceptions. |
Module Contents¶
- exception airflow.exceptions.AirflowException[source]¶
Bases:
ExceptionBase class for all Airflow’s errors.
Each custom exception should be derived from this class.
- exception airflow.exceptions.AirflowBadRequest[source]¶
Bases:
AirflowExceptionRaise when the application or server cannot handle the request.
- exception airflow.exceptions.AirflowNotFoundException[source]¶
Bases:
AirflowExceptionRaise when the requested object/resource is not available in the system.
- exception airflow.exceptions.AirflowConfigException[source]¶
Bases:
AirflowExceptionRaise when there is configuration problem.
- exception airflow.exceptions.AirflowSensorTimeout[source]¶
Bases:
AirflowExceptionRaise when there is a timeout on sensor polling.
- exception airflow.exceptions.AirflowRescheduleException(reschedule_date)[source]¶
Bases:
AirflowExceptionRaise 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.InvalidStatsNameException[source]¶
Bases:
AirflowExceptionRaise when name of the stats is invalid.
- exception airflow.exceptions.AirflowTaskTimeout[source]¶
Bases:
BaseExceptionRaise when the task execution times-out.
- exception airflow.exceptions.AirflowTaskTerminated[source]¶
Bases:
BaseExceptionRaise when the task execution is terminated.
- exception airflow.exceptions.AirflowSkipException[source]¶
Bases:
AirflowExceptionRaise when the task should be skipped.
- exception airflow.exceptions.AirflowFailException[source]¶
Bases:
AirflowExceptionRaise when the task should be failed without retrying.
- exception airflow.exceptions.AirflowInactiveAssetInInletOrOutletException(inactive_asset_keys)[source]¶
Bases:
_AirflowExecuteWithInactiveAssetExecptionRaise when the task is executed with inactive assets in its inlet or outlet.
- exception airflow.exceptions.AirflowOptionalProviderFeatureException[source]¶
Bases:
AirflowExceptionRaise by providers when imports are missing for optional provider features.
- exception airflow.exceptions.XComNotFound(dag_id, task_id, key)[source]¶
Bases:
AirflowExceptionRaise when an XCom reference is being resolved against a non-existent XCom.
- exception airflow.exceptions.AirflowDagDuplicatedIdException(dag_id, incoming, existing)[source]¶
Bases:
AirflowExceptionRaise when a DAG’s ID is already used by another DAG.
- exception airflow.exceptions.AirflowClusterPolicyViolation[source]¶
Bases:
AirflowExceptionRaise when there is a violation of a Cluster Policy in DAG definition.
- exception airflow.exceptions.AirflowClusterPolicySkipDag[source]¶
Bases:
AirflowExceptionRaise when skipping dag is needed in Cluster Policy.
- exception airflow.exceptions.AirflowClusterPolicyError[source]¶
Bases:
AirflowExceptionRaise for a Cluster Policy other than AirflowClusterPolicyViolation or AirflowClusterPolicySkipDag.
- exception airflow.exceptions.AirflowTimetableInvalid[source]¶
Bases:
AirflowExceptionRaise when a DAG has an invalid timetable.
- exception airflow.exceptions.DagNotFound[source]¶
Bases:
AirflowNotFoundExceptionRaise when a DAG is not available in the system.
- exception airflow.exceptions.DagCodeNotFound[source]¶
Bases:
AirflowNotFoundExceptionRaise when a DAG code is not available in the system.
- exception airflow.exceptions.DagRunNotFound[source]¶
Bases:
AirflowNotFoundExceptionRaise when a DAG Run is not available in the system.
- exception airflow.exceptions.DagRunAlreadyExists(dag_run)[source]¶
Bases:
AirflowBadRequestRaise when creating a DAG run for DAG which already has DAG run entry.
- exception airflow.exceptions.DuplicateTaskIdFound[source]¶
Bases:
AirflowExceptionRaise when a Task with duplicate task_id is defined in the same DAG.
- exception airflow.exceptions.TaskAlreadyInTaskGroup(task_id, existing_group_id, new_group_id)[source]¶
Bases:
AirflowExceptionRaise when a Task cannot be added to a TaskGroup since it already belongs to another TaskGroup.
- exception airflow.exceptions.SerializationError[source]¶
Bases:
AirflowExceptionA problem occurred when trying to serialize something.
- exception airflow.exceptions.ParamValidationError[source]¶
Bases:
AirflowExceptionRaise when DAG params is invalid.
- exception airflow.exceptions.TaskNotFound[source]¶
Bases:
AirflowNotFoundExceptionRaise when a Task is not available in the system.
- exception airflow.exceptions.TaskInstanceNotFound[source]¶
Bases:
AirflowNotFoundExceptionRaise when a task instance is not available in the system.
- exception airflow.exceptions.NotMapped[source]¶
Bases:
ExceptionRaise if a task is neither mapped nor has any parent mapped groups.
- exception airflow.exceptions.PoolNotFound[source]¶
Bases:
AirflowNotFoundExceptionRaise when a Pool is not available in the system.
- class airflow.exceptions.FileSyntaxError[source]¶
Bases:
NamedTupleInformation about a single error in a file.
- exception airflow.exceptions.AirflowFileParseException(msg, file_path, parse_errors)[source]¶
Bases:
AirflowExceptionRaises 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
- exception airflow.exceptions.AirflowUnsupportedFileTypeException[source]¶
Bases:
AirflowExceptionRaise when a file type is not supported.
- exception airflow.exceptions.ConnectionNotUnique[source]¶
Bases:
AirflowExceptionRaise when multiple values are found for the same connection ID.
- exception airflow.exceptions.VariableNotUnique[source]¶
Bases:
AirflowExceptionRaise when multiple values are found for the same variable name.
- exception airflow.exceptions.DownstreamTasksSkipped(*, tasks)[source]¶
Bases:
AirflowExceptionSignal by an operator to skip its downstream tasks.
Special exception raised to signal that the operator it was raised from wishes to skip downstream tasks. This is used in the ShortCircuitOperator.
- Parameters:
tasks (collections.abc.Sequence[str | tuple[str, int]]) – List of task_ids to skip or a list of tuples with task_id and map_index to skip.
- exception airflow.exceptions.DagRunTriggerException(*, trigger_dag_id, dag_run_id, conf, logical_date, reset_dag_run, skip_when_already_exists, wait_for_completion, allowed_states, failed_states, poke_interval, deferrable)[source]¶
Bases:
AirflowExceptionSignal by an operator to trigger a specific Dag Run of a dag.
Special exception raised to signal that the operator it was raised from wishes to trigger a specific Dag Run of a dag. This is used in the
TriggerDagRunOperator.
- exception airflow.exceptions.TaskDeferred(*, trigger, method_name, kwargs=None, timeout=None)[source]¶
Bases:
BaseExceptionSignal an operator moving to deferred state.
Special exception raised to signal that the operator it was raised from wishes to defer until a trigger fires. Triggers can send execution back to task or end the task instance directly. If the trigger should end the task instance itself,
method_namedoes not matter, and can be None; otherwise, provide the name of the method that should be used when resuming execution in the task.- timeout: datetime.timedelta | None[source]¶
- exception airflow.exceptions.TaskDeferralError[source]¶
Bases:
AirflowExceptionRaised when a task failed during deferral for some reason.
- exception airflow.exceptions.TaskDeferralTimeout[source]¶
Bases:
AirflowExceptionRaise when there is a timeout on the deferral.
- exception airflow.exceptions.PodMutationHookException[source]¶
Bases:
AirflowExceptionRaised when exception happens during Pod Mutation Hook execution.
- exception airflow.exceptions.PodReconciliationError[source]¶
Bases:
AirflowExceptionRaised when an error is encountered while trying to merge pod configs.
- exception airflow.exceptions.RemovedInAirflow4Warning[source]¶
Bases:
DeprecationWarningIssued for usage of deprecated features that will be removed in Airflow4.
- exception airflow.exceptions.AirflowProviderDeprecationWarning[source]¶
Bases:
DeprecationWarningIssued for usage of deprecated features of Airflow provider.
- exception airflow.exceptions.DeserializingResultError[source]¶
Bases:
ValueErrorRaised when an error is encountered while a pickling library deserializes a pickle file.
- exception airflow.exceptions.UnknownExecutorException[source]¶
Bases:
ValueErrorRaised when an attempt is made to load an executor which is not configured.