I am learning Apache Airflow and trying to write hello world version of it.
I have setup up apache airflow version 2.0 with python version 3.8and below is code containing dag and task
import datetime
import logging
from airflow import DAG
from airflow.operators.python import PythonOperator
def greet_hello():
logging.info("Hello World")
dag = DAG("FirstDag", start_date=datetime.datetime.now(),schedule_interval=None)
first_task = PythonOperator(python_callable=greet_hello , dag=dag , task_id="first-task")
I have configured apache airflow in the following way
- pip install apache-airflow in venv
- airflow create user ....
- airflow db init
- airflow webserver
- airflow scheduler
I can see the Dag in the UI
But when I check the task instance details I see below message
"Task Instance State Task is in the 'None' state which is not a valid state for execution. The task must be cleared in order to be run."
Even though the scheduler is running I am getting below message in UI
When I go to graph view , and hover over first-task , it says not yet started. I am struggling to figure out what wrong I am going and how to resolve it. Thank you

