airflow.exceptions
¶
Exceptions used by Airflow.
Module Contents¶
Classes¶
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.
- 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.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.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.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.
- 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.AirflowDagInconsistent[source]¶
Bases:
AirflowException
Raise when a DAG has inconsistent attributes.
- 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, execution_date, run_id)[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.FailStopDagInvalidTriggerRule[source]¶
Bases:
AirflowException
Raise when a dag has ‘fail_stop’ 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.
- 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.
- 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.
- exception airflow.exceptions.TaskDeferralError[source]¶
Bases:
AirflowException
Raised when a task failed during deferral for some reason.
- 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.