-
Notifications
You must be signed in to change notification settings - Fork 64
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
SystemError AST constructor recursion depth mismatch error on Python 3.11 #361
Comments
It might be that you've got the same template which is being rendered from different call sites such that the stack depth could vary between runs. What happens if you use the environment variable |
Thanks @malthe Here's what I get: pyramid.httpexceptions.HTTPNotFound: The resource could not be found.
During handling of the above exception, another exception occurred:
d['__loader'] = self._loader
AttributeError: 'PyramidPageTemplateFile' object has no attribute '_loader' Does that tell you what's happening? I don't know what to make of this. Obviously, without this setting there is no HTTPNotFound error. This code has been mostly unchanged for a long time and this error only started appearing on Python 3.11 (though it may have been hiding in there somewhere before). |
@mikeckennedy I have fixed this issue; are you able to apply this patch to see if we're getting any result out of |
H @malthe i. I tried it out. I think it fixes it. Certainly no more errors that I could find. Thank you very much! |
I'm closing this one out because I think the root cause is that the stack is too deep which is out of our control. Eager parsing is a remedy in this case (which has now been fixed). |
Awesome, thanks. Do I need to set |
@mikeckennedy released now as https://pypi.org/project/Chameleon/3.10.2/. Yes – you would have to use that environment variables on your servers, simply because of how your app apparently works. Well, that's our "working theory" about it at least ... |
Great, thanks for the info. That’s fine by me. Just want to make sure I’m “doing it right.” :) |
Hey there. Love Chameleon. But since upgrading our site to run on 3.11, we've been getting a fair number of errors like this:
SystemError: AST constructor recursion depth mismatch (before=396, after=241)
on chameleon/astutil.py in parse at line 46. Any idea what's happening? Most of the time the pages run fine, but some of the time, we get this.
The text was updated successfully, but these errors were encountered: