I have structure as below in my native airflow build
dags/cust_dag.py dags/jhook.py --contains class UtilTriggers under which there are multiple methods
In cust_dag code i am calling that hook/module as :
from jhook import UtilTriggers as trigger
When I check on Airflow UI, I am getting broken dag for cust_dag mentioning error as ModuleNotFoundError: No module named jhook
The same kind of code is working on composer 1.9, currently I am running this on native airflow.
Also I have tried adding init.py file as well as created a new folder job_trigger under which I added that file still not working.
I have tried solution mentioned in this question Apache Airflow DAG cannot import local module
i.e adding below code lines in both hook custom module and dag file import sys sys.path.insert(0,os.path.abspath(os.path.dirname(file)))
Please guide me what can be the cause for this ModuleNotFound Error when everything looks okay.