How to Solve NameError: name 'AirflowException' is not defined -- airflow

Solution: Import the 'AirflowException' module

# Add the following line to the top of your code
from airflow.exceptions import AirflowException

 

For more information:
airflow AirflowException