# Help with dbtTaskGroup throwing error and I can not find the cause.

**URL:** <https://discourse.getdbt.com/t/help-with-dbttaskgroup-throwing-error-and-i-can-not-find-the-cause/16927>\
**Category:** Help\
**Created:** [November 11, 2024, 8:13am UTC](https://discourse.getdbt.com/t/help-with-dbttaskgroup-throwing-error-and-i-can-not-find-the-cause/16927 "2024-11-11T08:13:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cary](https://avatars.discourse-cdn.com/v4/letter/c/ce73a5/32.png) [@Cary](https://discourse.getdbt.com/u/Cary)\
**Post date:** [November 11, 2024, 8:13am UTC](https://discourse.getdbt.com/t/help-with-dbttaskgroup-throwing-error-and-i-can-not-find-the-cause/16927/1 "2024-11-11T08:13:10Z")

</div>

## The problem I’m having

I had several dbt dimensions created and running under Airflow MWAA. Then all of sudden I started getting the following error and I can not figure out the cause.

## What I’ve already tried

I remove all the models but 1 simple dimension that creates view. I still get the error. I have removed all macros and other components trying to solve the error.

## Error

Broken DAG: [/usr/local/airflow/dags/hhp\_clinical/dags/hhp\_clinical\_table\_DIM\_ETHNICITY.py]  
Traceback (most recent call last):  
File “/usr/local/airflow/.local/lib/python3.11/site-packages/cosmos/dbt/graph.py”, line 348, in run\_dbt\_ls  
stdout = run\_command(ls\_command, tmp\_dir, env\_vars)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/local/airflow/.local/lib/python3.11/site-packages/cosmos/dbt/graph.py”, line 120, in run\_command  
**raise CosmosLoadDbtException(f"Unable to run {command} due to the error:\n{details}")**  
**cosmos.dbt.graph.CosmosLoadDbtException: Unable to run [‘/usr/local/airflow/python3-virtualenv/dbt-env/bin/dbt’, ‘ls’, ‘–output’, ‘json’, ‘–project-dir’, ‘/tmp/tmpcidd56fq’, ‘–profiles-dir’, ‘/usr/local/airflow/dags/hhp\_clinical/dbt\_hhp\_clinical’, ‘–profile’, ‘dbt\_hhp\_clinical’, ‘–target’, ‘current’, ‘–select’, ‘stg\_ethnicity’]** due to the error:  
Traceback (most recent call last):  
File “/usr/local/airflow/python3-virtualenv/dbt-env/bin/dbt”, line 8, in   
sys.exit(cli())  
^^^^^  
File “/usr/local/airflow/python3-virtualenv/dbt-env/lib/python3.11/site-packages/click/core.py”, line 1157, in **call**  
return self.main(\*args, \*\*kwargs)  
^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/local/airflow/python3-virtualenv/dbt-env/lib/python3.11/site-packages/click/core.py”, line 1078, in main  
rv = self.invoke(ctx)  
^^^^^^^^^^^^^^^^  
File “/usr/local/airflow/python3-virtualenv/dbt-env/lib/python3.11/site-packages/click/core.py”, line 1688, in invoke  
return \_process\_result(sub\_ctx.command.invoke(sub\_ctx))  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/local/airflow/python3-virtualenv/dbt-env/lib/python3.11/site-packages/click/core.py”, line 1434, in invoke  
return ctx.invoke(self.callback, \*\*ctx.params)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/local/airflow/python3-virtualenv/dbt-env/lib/python3.11/site-packages/click/core.py”, line 783, in invoke  
return \_\_callback(\*args, \*\*kwargs)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/local/airflow/python3-virtualenv/dbt-env/lib/python3.11/site-packages/click/decorators.py”, line 33, in new\_func  
return f(get\_current\_context(), \*args, \*\*kwargs)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/local/airflow/python3-virtualenv/dbt-env/lib/python3.11/site-packages/dbt/cli/main.py”, line 148, in wrapper  
return func(\*args, \*\*kwargs)  
^^^^^^^^^^^^^^^^^^^^^  
File “/usr/local/airflow/python3-virtualenv/dbt-env/lib/python3.11/site-packages/dbt/cli/requires.py”, line 156, in wrapper  
fire\_event(  
File “/usr/local/airflow/python3-virtualenv/dbt-env/lib/python3.11/site-packages/dbt\_common/events/functions.py”, line 139, in fire\_event  
get\_event\_manager().fire\_event(e, level=level)  
File “/usr/local/airflow/python3-virtualenv/dbt-env/lib/python3.11/site-packages/dbt\_common/events/event\_manager.py”, line 15, in fire\_event  
msg = msg\_from\_base\_event(e, level=level)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/local/airflow/python3-virtualenv/dbt-env/lib/python3.11/site-packages/dbt\_common/events/base\_types.py”, line 139, in msg\_from\_base\_event  
“msg”: event.message(),  
^^^^^^^^^^^^^^^  
File “/usr/local/airflow/python3-virtualenv/dbt-env/lib/python3.11/site-packages/dbt/events/types.py”, line 1990, in message  
return f"Resource report: {self.to\_json()}"  
^^^^^^^^^^^^^^  
File “/usr/local/airflow/python3-virtualenv/dbt-env/lib/python3.11/site-packages/dbt\_common/events/base\_types.py”, line 98, in to\_json  
return MessageToJson(  
^^^^^^^^^^^^^^  
TypeError: MessageToJson() got an unexpected keyword argument **‘including\_default\_value\_fields’**

## Some example code or error messages

```auto
     dw_dim_ethnicity_transform = DbtTaskGroup(
                    group_id = f"Run_{control_data.model_name.lower()}",
                    project_config=project_config,
                    profile_config=profile_config,
                    execution_config=control_data.execution_config,
                    operator_args={"install_deps": False},                      
                    default_args={"retries": control_data.retries, "debug": True},            
                    render_config = RenderConfig(select=[f"stg_ethnicity"], test_behavior=TestBehavior.AFTER_ALL)
        )

```

Any help will be greatly appreciated.

Cary
