Airflow can't find dbt_project.yml even though the path is passed in ProjectConfig function

I’m building a DbtTaskGroup with the new cosmos update (1.0.3). However, Airflow keeps giving me this error that it can’t find dbt_project.yml even though I passed the path in the ProjectConfig function:

Broken DAG: [/app/dags/airbyte-dbt.py] Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/cosmos/converter.py", line 106, in __init__
    project_config.validate_project()
  File "/usr/local/lib/python3.9/site-packages/cosmos/config.py", line 82, in validate_project
    raise CosmosValueError(f"Could not find {name} at {project_yml_path}")
cosmos.exceptions.CosmosValueError: Could not find dbt_project.yml at app/dbt/dbt_project.yml

Here is my code:

profile_config = ProfileConfig(
    profile_name="dbt_demo",
    target_name="dev",
    profiles_yml_filepath=''
    )

with DAG('dbt_execution_dag', default_args=default_args, schedule_interval='@daily') as dag:

    dbt_run = DbtTaskGroup(
        project_config=ProjectConfig(dbt_project_path="app/dbt/"),
        profile_config=profile_config,
    )

And here is the dbt_project.yml inside the directory:

1 Like

Having the same issue, tried a bunch of things. Were you able to solve it ?

Hey @azar01j

Could you please confirm what is the cosmos version you are using? Also, could you share the DAG/code?

Thanks
Manmeet