Comments (8)
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 CHAMELEON_EAGER=1
– ?
from chameleon.
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).
from chameleon.
@mikeckennedy I have fixed this issue; are you able to apply this patch to see if we're getting any result out of CHAMELEON_EAGER=1
now?
from chameleon.
H @malthe i. I tried it out. I think it fixes it. Certainly no more errors that I could find. Thank you very much!
from chameleon.
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).
from chameleon.
Awesome, thanks. Do I need to set CHAMELEON_EAGER=1
on my servers? It sounds like I should.
from chameleon.
@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 ...
from chameleon.
Great, thanks for the info. That’s fine by me. Just want to make sure I’m “doing it right.” :)
from chameleon.
Related Issues (20)
- Chameleon support for Python 3.11? HOT 4
- i18n:target undefined variable HOT 2
- `target_language` not passed to the translate method in certain cases HOT 1
- Python f-strings with numbers give unexpected results
- Missing tag for 4.0.1 HOT 2
- 4.0.1: `chameleon` code is using deprecated `pkg_resources` module HOT 6
- Boolean HTML attribute behavior under >3.8.0 HOT 2
- 4.1.0 wheel doesn't work under Python 3.11 HOT 5
- RFE: is it possible to start making github releases?🤔 HOT 3
- SystemError: AST constructor recursion depth mismatch HOT 9
- dict-like Scope breaks locals() introspection HOT 2
- 4.3.0 release is breaking on Windows HOT 6
- Fix deprecated ast.Str (replace with ast.Constant)
- Tests are missing in 4.4.1 release HOT 4
- Automated release workflow
- 'PosixPath' object has no attribute 'at' HOT 3
- Type annotations HOT 5
- Find better linting tool HOT 6
- PageTemplateLoader constructor no longer accepts default_extension as a positional argument in v4.5.0 HOT 1
- Static symbols sometimes not correctly imported HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chameleon.