-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
RecursionError: maximum recursion depth exceeded in comparison #1080
Comments
Thanks for the report @ArthurZ! This one is definitely new to me. You indicated:
I have to imagine that this has more to do with the context of the models, and not the number of models itself! Are you able to share some example code that you're using? That might help us track this down |
Whenever I got they error before it had nothing to do with recursion or stack traces in Python, but was always typos or unquoted variables. For example, if you build a dependent model with the ref function, make sure you quote the model name E.g. SELECT *
FROM {{ ref(my_cool_model) }} Could blow up dbt and return an error like that. Where fixing it to: SELECT *
FROM {{ ref('my_cool_model') }} Would run as expected |
I am going to pick my jaw up from off of the floor, and then I am going to submit a bugfix for this. How am I just hearing about this issue??? Thanks for the test case @raybuhr - i can reproduce that locally |
Hi all there, Thank you for jumping on this issue so quick and sorry for the delay in replying. To start off, @beckjake it is a good try, but no, all is quoited. And the SQL is a valid Redshift one I can actually execute. So the offending code (mind it is modified for content, but not logic to protect the innocent) is:
|
Hi @ArthurZ - I don't see any jinja in there at all, am I missing something? Is this the rendered form? And I can compile/run the given SQL in dbt (obviously with "relation does not exist" errors since I don't have your schema) |
Hi @beckjake I did not use any Jinja. The underlined relations are actually complex views in my case. Would that be somehow of an issue? |
Hey @ArthurZ - dbt just passes along your SQL to the warehouse, so I think this error must come from either jinja in your model files, or possibly from configuration in It's super hard to say why this would happen without seeing some more code and/or logs. If you're in the dbt Slack, can you DM me? I'm @drew.banin. Or, feel free to post as much of your model code,
Thanks for helping us get this sorted! |
The new files might not be causing the error then. Can you try removing those two new queries and running dbt again? |
Hey @drewbanin the log contents are posted above when I opened the ticket. There is nothing new on each run. Now I inspected both, the dbt_project.yml, and schema.yml files and can't see anything that would raise my suspicion. I will Slack you time permits. A big thank you! |
Yes @raybuhr, if I delete just one of the newly added files |
…alid-refs Fix/more helpful invalid refs (#1080)
Heh, so it was not even the SQL part but the |
Just to be super clear for anyone else that finds this issue: The problem was that @ArthurZ specified This was mostly fixed in #1085, though let's merge #1086 before closing this issue. cc @beckjake |
Issue
RecursionError: maximum recursion depth exceeded in comparison
Issue description
Running
dbt run
when my project has 3 files in the model folder works, but adding one more errors out with the above.Results
Error above should not occur, must be able to complete
dbt run
System information
The output of
dbt --version
:The operating system you're running on: MacOS 10.13.6
The python version you're using (probably the output of
python --version
)Python 3.6.6 :: Anaconda custom (64-bit)
Steps to reproduce
In as much detail as possible, please provide steps to reproduce the issue. Sample data that triggers the issue, example models, etc are all very helpful here.
Just keep adding new files with SQL into the models/afolder/
The output of the
--debug
command:The text was updated successfully, but these errors were encountered: