0

If I run the DAG inside the docker container with airflow run dag_A task_1 ... command, it works fine. But if I trigger the same DAG via the web-UI, it will fail with the following error: AirflowException: Bash command failed. Sifting through the error logs, revealed this error ImportError: No module named some-lib where some-lib is a local module inside the dag folder. I think the error is related to this question posted in SO - Apache Airflow DAG cannot import local module

I added the __init__.py files in the dag folder and sub-folders but did not seem to help. I also set ENV PYTHONPATH=<path-to-dag>:${PYTHONPATH} in Dockerfile but did not work as well.

alltej
  • 6,787
  • 10
  • 46
  • 87

0 Answers0