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

Solution: Import the 'settings' module

# Add the following line to the top of your code
from airflow import settings

 

For more information:
airflow settings