zorzigio commented on issue #15572:
URL: https://github.com/apache/airflow/issues/15572#issuecomment-855713118


   > @zorzigio
   > I'm use airflow helm chart and image info is below
   > 
   > ```
   > image:
   >     repository: apache/airflow
   >     tag: 2.0.2-python3.8
   > ```
   > 
   > I add just `PYTHONPATH` to config env
   > 
   > ```
   > #values.yaml
   > airflow:
   >   config:
   >     PYTHONPATH: /opt/airflow/dags/repo # repo is created because of 
gitsync 
   > ```
   > 
   > then import error is gone 
   > my dags folder tree
   > 
   > ```
   > dags
   >   ㄴ __init__.py
   >   ㄴ example.py
   >   ㄴ utils
   >     ㄴ decorator.py
   >   ㄴ category_1
   >     ㄴ file_1.py
   >     ㄴ file_2.py
   > ```
   > 
   > now I can `from dags import some_function` in file_1 and file_2
   > Also I can `from dags.utils.decorator import some` in example.py
   
   Thanks @sawaca96, I didn't try this yet but I guess it will work.
   
   As from the [Airflow 
documentation](https://airflow.apache.org/docs/apache-airflow/stable/modules_management.html#additional-modules-in-airflow),
 Airflow should include the dags path by default?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to