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 web server times out. |
|
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. |
|
Raise when the task is executed with inactive assets in its inlet or outlet. |
|
Raise when inactive assets are added to an asset alias. |
|
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 mapped downstream's dependency fails to push XCom for task mapping. |
|
Raise when an unmappable type is pushed as a mapped downstream's dependency. |
|
Raise when the pushed value is too large to map as a downstream's dependency. |
|
Raise when there is a cycle in DAG definition. |
|
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 DAG ID is still in DagBag i.e., DAG file is in DAG folder. |
|
Raise when a dag has 'fail_fast' enabled yet has a non-default trigger rule. |
|
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 when a Pool is not available in the system. |
|
Raises when connection or variable file can not be parsed. |
|
Raise when multiple values are found for the same connection ID. |
|
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 Airflow3. |
|
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. |
Classes¶
Information about a single error in a file. |
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.
- exception airflow.exceptions.AirflowBadRequest[source]¶
Bases:
AirflowException
Raise when the application or server cannot handle the request.
- exception airflow.exceptions.AirflowNotFoundException[source]¶
Bases:
AirflowException
Raise when the requested object/resource is not available in the system.
- 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.InvalidStatsNameException[source]¶
Bases:
AirflowException
Raise when name of the stats is invalid.
- exception airflow.exceptions.AirflowTaskTimeout[source]¶
Bases:
BaseException
Raise when the task execution times-out.
- exception airflow.exceptions.AirflowTaskTerminated[source]¶
Bases:
BaseException
Raise when the task execution is terminated.
- 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.AirflowExecuteWithInactiveAssetExecption(inactive_asset_unikeys)[source]¶
Bases:
AirflowFailException
Raise when the task is executed with inactive assets.
- exception airflow.exceptions.AirflowInactiveAssetInInletOrOutletException(inactive_asset_unikeys)[source]¶
Bases:
AirflowExecuteWithInactiveAssetExecption
Raise when the task is executed with inactive assets in its inlet or outlet.
- exception airflow.exceptions.AirflowInactiveAssetAddedToAssetAliasException(inactive_asset_unikeys)[source]¶
Bases:
AirflowExecuteWithInactiveAssetExecption
Raise when inactive assets are added to an asset alias.
- exception airflow.exceptions.AirflowOptionalProviderFeatureException[source]¶
Bases:
AirflowException
Raise by providers when imports are missing for optional provider features.
- exception airflow.exceptions.XComNotFound(dag_id, task_id, key)[source]¶
Bases:
AirflowException
Raise when an XCom reference is being resolved against a non-existent XCom.
- exception airflow.exceptions.XComForMappingNotPushed[source]¶
Bases:
AirflowException
Raise when a mapped downstream’s dependency fails to push XCom for task mapping.
- exception airflow.exceptions.UnmappableXComTypePushed(value, *values)[source]¶
Bases:
AirflowException
Raise when an unmappable type is pushed as a mapped downstream’s dependency.
- 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.
- 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.
- exception airflow.exceptions.AirflowClusterPolicyViolation[source]¶
Bases:
AirflowException
Raise when there is a violation of a Cluster Policy in DAG definition.
- exception airflow.exceptions.AirflowClusterPolicySkipDag[source]¶
Bases:
AirflowException
Raise when skipping dag is needed in Cluster Policy.
- exception airflow.exceptions.AirflowClusterPolicyError[source]¶
Bases:
AirflowException
Raise for a Cluster Policy other than AirflowClusterPolicyViolation or AirflowClusterPolicySkipDag.
- 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(dag_run)[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.FailFastDagInvalidTriggerRule[source]¶
Bases:
AirflowException
Raise when a dag has ‘fail_fast’ enabled yet has a non-default trigger rule.
- exception airflow.exceptions.DuplicateTaskIdFound[source]¶
Bases:
AirflowException
Raise 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:
AirflowException
Raise when a Task cannot be added to a TaskGroup since it already belongs to another TaskGroup.
- exception airflow.exceptions.SerializationError[source]¶
Bases:
AirflowException
A problem occurred when trying to serialize something.
- 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.
- class airflow.exceptions.FileSyntaxError[source]¶
Bases:
NamedTuple
Information about a single error in a file.
- 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
- 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
Signal 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_name
does 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:
AirflowException
Raised when a task failed during deferral for some reason.
- exception airflow.exceptions.TaskDeferralTimeout[source]¶
Bases:
AirflowException
Raise when there is a timeout on the deferral.
- exception airflow.exceptions.PodMutationHookException[source]¶
Bases:
AirflowException
Raised when exception happens during Pod Mutation Hook execution.
- exception airflow.exceptions.PodReconciliationError[source]¶
Bases:
AirflowException
Raised when an error is encountered while trying to merge pod configs.
- exception airflow.exceptions.RemovedInAirflow3Warning[source]¶
Bases:
DeprecationWarning
Issued for usage of deprecated features that will be removed in Airflow3.
- exception airflow.exceptions.AirflowProviderDeprecationWarning[source]¶
Bases:
DeprecationWarning
Issued for usage of deprecated features of Airflow provider.
- exception airflow.exceptions.DeserializingResultError[source]¶
Bases:
ValueError
Raised when an error is encountered while a pickling library deserializes a pickle file.
- exception airflow.exceptions.UnknownExecutorException[source]¶
Bases:
ValueError
Raised when an attempt is made to load an executor which is not configured.