<@U088WCP3B4P> I started to have 'Macro' object ha...
# ask-elementary-ai
m
@kapa.ai I started to have 'Macro' object has no attribute 'config' error. Installed packages:
Copy code
20:59:44  Running with dbt=1.10.11
20:59:45  Installing dbt-labs/dbt_utils
20:59:45  Installed from version 1.3.0
20:59:45  Updated version available: 1.3.1
20:59:45  Installing elementary-data/elementary
20:59:45  Installed from version 0.18.3
20:59:45  Updated version available: 0.19.4
k
A message from kapa.ai
The error "'Macro' object has no attribute 'config'" is a type of compilation error that has been reported in Elementary when there are issues with macro compatibility, especially around the use of the
config
attribute in macros. This often happens when there are naming collisions or incompatibilities between dbt packages, or when certain macros are overridden in your project. From the knowledge sources, similar errors have occurred in the past due to: - Overriding core dbt macros like
ref()
in your project, which can interfere with how Elementary expects to interact with dbt's internals. If you have overridden macros such as
ref
, this can cause such errors. Disabling automatic dbt invocation upload by adding the following to your
dbt_project.yml
can be a workaround:
Copy code
yaml   vars:     disable_dbt_invocation_autoupload: true
This disables the feature that triggers the problematic macro, allowing your runs to complete successfully while the underlying issue is addressed in a future release. This workaround has been confirmed to resolve similar issues in the past, especially when macro overrides are present in the project [see discussion here](https://slack.com/archives/C02CTC89LAX/p1667235374261789). - Incompatibilities between dbt, Elementary, and other packages. While your versions (dbt 1.10.11, dbt_utils 1.3.0, elementary 0.18.3) are relatively recent, it's always a good idea to ensure all packages are on the latest compatible versions. Upgrading Elementary to the latest version (0.19.4 as noted in your output) may resolve the issue if it is due to a recently fixed bug. - Macro name collisions between packages. If you have multiple packages that define macros with the same name, dbt may not always resolve them as expected, leading to errors like this. Ensuring all packages are up to date and checking for macro overrides in your project can help. If you are not overriding any macros and upgrading does not resolve the issue, please provide more details about the full error traceback and any custom macros you may have in your project. This will help further diagnose the root cause. Summary of steps to try: 1. Upgrade Elementary to the latest version (0.19.4). 2. Add
vars: disable_dbt_invocation_autoupload: true
to your
dbt_project.yml
if you override core macros like
ref
. 3. Check for macro name collisions or overrides in your project. If the problem persists after these steps, please share more details for further troubleshooting.