Airflow DAGs fail with ModuleNotFoundError for internal package when using Astro Runtime Docker Image #61399
Unanswered
dattatejaofficial
asked this question in
Q&A
Replies: 1 comment 2 replies
-
|
It's a problem with Astro vmost likely - you need to make sure that your dags folder is added to the PYTHONPATH - I think others raised similar issues - you have to check with astro |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am running Apache Airflow using Astronomer Astro Runtime in Docker. The Airflow UI starts correctly, but DAG parsing fails with:
ModuleNotFoundError: No module named 'currentsystem'Here currentsystem is the system I am building currently. This is an internal Python Package from the same repository.
Project Structure
repo-root/
│
├── setup.py
├── currentsystem/ # internal python package
│ └── init.py
│
├── monitoring/ # airflow project directory
│ └── dags/
│ └── monitoring_pipeline.py
│
└── Dockerfile
The existing Dockerfile consists of
FROM quay.io/astronomer/astro-runtime:13.4.0& later updated toFROM quay.io/astronomer/astro-runtime:13.4.0
WORKDIR /usr/local/airflow
COPY setup.py ./
COPY currentsystem/ ./currentsystem/
COPY monitoring/ ./monitoring/
RUN pip install -e .
ENV AIRFLOW__CORE__DAGS_FOLDER=/usr/local/airflow/monitoring/dags
Is there a recommended way in Astro Runtime to:
Beta Was this translation helpful? Give feedback.
All reactions