Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'No keyword argument' macro error does not report location of bad call #2073

Closed
1 of 5 tasks
markberger opened this issue Jan 27, 2020 · 1 comment · Fixed by #2238
Closed
1 of 5 tasks

'No keyword argument' macro error does not report location of bad call #2073

markberger opened this issue Jan 27, 2020 · 1 comment · Fixed by #2238
Labels
bug Something isn't working

Comments

@markberger
Copy link

Describe the bug

If a macro is supplied a keyword arg that does not exist, the output message does not return the file and line number of the bad macro call.

Steps To Reproduce

Call an existing macro with a bad argument, for example:

  SELECT {{ dbt_utils.star(from=ref('my_model'), excepts=[]) }}
  FROM {{ ref('my_model') }}

excepts should be except. Then run dbt compile:

$ dbt compile
Running with dbt=0.15.1
Encountered an error:
Compilation Error in macro star (macros/sql/star.sql)
  macro 'dbt_macro__star' takes no keyword argument 'excepts'

Expected behavior

Also give file name and line number of the bad macro call

Screenshots and log output

System information

Which database are you using dbt with?

  • postgres
  • redshift
  • bigquery
  • snowflake
  • other (specify: ____________)

The output of dbt --version:
0.15.1

The operating system you're using:
macOS mojave

The output of python --version:
3.6.5

Additional context

Add any other context about the problem here.

@markberger markberger added bug Something isn't working triage labels Jan 27, 2020
@drewbanin drewbanin removed the triage label Jan 27, 2020
@drewbanin
Copy link
Contributor

Thanks for the report @markberger! We'll check it out

@drewbanin drewbanin added this to the Octavius Catto milestone Feb 27, 2020
beckjake added a commit that referenced this issue Mar 25, 2020
…r-add-file

fix commit messages by using the stack properly (#2073)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants