I've installed Apache Airflow version 2.2.4 on my system Ubuntu 20.0.4 LTS and I'm using these steps
When I'm running my server using this command
I've got an error saying
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: session
How can I solve this error?
For me the issue was that I have set the AIRFLOW_HOME
on one tab of my terminal, but on the other tab (from where I was running the webserver) I forgot to set it. So the solution is to do the following in ALL TERMINAL TABS that you're using for Airflow:
Activate the virtual environment where your Airflow is installed
source your_airflow_venv/bin/activate
Navigate to the directory where your Airflow project is
cd /path_to_your_airflow_dir
Update your AIRFLOW_HOME
environment variable
export AIRFLOW_HOME=$(pwd)
Initialize the Airflow database
airflow db init
Start the Airflow Web Server or the Airflow Scheduler (depending on which terminal tab you currently are)
airflow scheduler
airflow webserver
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With