Closed jonluca closed 6 months ago
I think the issue lives in the jinja templates, because the error disappears if I update the type from ._types to .._types Before:
After:
And the same thing in query.py
But I cant seem to trace where in the code this template is coming from.
ok i have no idea what happened but uninstall prisma and reinstalling it and then install prisma globally with node fixed it. I have no idea how the code could have codegened incorrectly but closing this for now
Ah sorry @jonluca this is an issue that happens when you've generated the client with one version, e.g. 0.12.0
, and then upgrade to a newer version, e.g. 0.13.0
. The old generated files are not removed when you install a new version for some reason, which then causes errors like this when internal code has been changed.
We provide a CLI for resetting the installation to a clean, non-generated state which would also solve your issue.
python -m prisma_cleanup
This has tripped a couple of people up so I'll see if I can provide a helpful error message in this case.
Oh interesting that makes sense. That's what I thought it was so I did pip uninstall prisma but still saw it after that. This makes sense though, thanks!
Bug description
When we upgraded to version 0.13.0 we started seeing an exception in our import
The error appears to be in the generation of
prisam.engine._types
.When you try and import from
prisma.engine
, it imports the instantiated versions of the query and abstract classes.However these say
Error No module named 'prisma.engine._types'
How to reproduce
Expected behavior
The client generats properly
Environment & setup