-
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
Running dbt with an invalid table reference returns a cryptic can't pickle ParserMacroCapture objects
.
#2110
Comments
can't pickle ParserMacroCapture objects
can't pickle ParserMacroCapture objects
.
Thanks for the report @GuillaumeLegoy! I'm leaving this one as a I'm think the fix here might be to make the Edit: just because it's worth saying: bad/unhandled error messages like this one are bugs IMO! |
@drewbanin I think that's actually a little bit hard - the
We'd have to change how we define the A better path might be removing the idea of "capturing" macros at all, seeing as we don't use that code anyway. (I'm pretty sure if we were actually using it, we'd be not including macros in the model parsing env). I'm not sure what that would break, but probably a lot! |
100% agree on the error message being terrible though - we can do better than this, for sure. |
@beckjake sure, I'm happy to rip out macro capturing if we can! |
@beckjake is this caused by post-parse pickling for partial parsing? would using JSON (or another format) fix this error? we should still rip out ParserMacroCapture, just curious how this connects to other specific partial parsing work that we are prioritizing |
Let's spend ~1 day on this, and if we don't feel like we have a good answer, we should reconvene about the best way to solve this problem @beckjake |
Edit: originally a bug, but more of an improvement so labels might not be adequate anymore.
Describe the bug
When running a dbt command (
dbt run
ordbt seed
) with an invalid reference table (no quote) as part of a model ({{ ref(keywords) }}
instead of{{ ref('keywords') }}
) for instance, the terminal returns the following:can't pickle ParserMacroCapture objects
Weirdly, the behavior seems to be present in dbt 0.15.0, 0.15.1, 0.15.2 but not in dbt 0.14.4.
Steps To Reproduce
In my project here the bug happens when running the command described above:
pipenv run dbt seed --profile-dir=.
from the root folder. Fixing the ref model by adding single quotes around its name fixes the issue.Expected behavior
A better error message when a ref is not valid, for instance:
Invalid ref able, missing single quotes around identifier
.Screenshots and log output
System information
Which database are you using dbt with?
The output of
dbt --version
:Again works with
dbt 0.14.4
and below.The operating system you're using:
Linux PopOs
The output of
python --version
:3.7.5
The text was updated successfully, but these errors were encountered: