Comments (2)
Is this also on Chameleon 2.2?
Because I've fixed another issue with the escaping of these characters
and that fix is included in 2.2.
\malthe
On 30 July 2011 23:16, rpatterson
[email protected]
wrote:
I had to make this change to workaround a chameleon error. Here's the TB::
Failed example:
portal.restrictedTraverse('update_stock_portlet')(
assignment='plone.rightcolumn/bar-header')
Exception raised:
Traceback (most recent call last):
File "/home/xen/src/python/parts/opt/lib/python2.7/doctest.py", line 1254, in run
compileflags, 1) in test.globs
File "<doctest README.txt[16]>", line 2, in
assignment='plone.rightcolumn/bar-header')
File "/home/xen/src/work/ovt.buildout/src/collective.periodicportlet/collective/periodicportlet/stock.py", line 67, in __call
assign.text = self.index(*_quote)
File "/usr/local/lib/python/site-packages/Zope2-2.13.8-py2.7.egg/Products/Five/browser/pagetemplatefile.py", line 125, in call
return self.im_func(im_self, *args, *_kw)
File "/usr/local/lib/python/site-packages/Zope2-2.13.8-py2.7.egg/Products/Five/browser/pagetemplatefile.py", line 59, in call
sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
File "/usr/local/lib/python/site-packages/zope.pagetemplate-3.5.2-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 107, in pt_render
raise PTRuntimeError(str(self._v_errors))
- Warning: Compilation failed
- Warning: chameleon.exc.ExpressionError: invalid syntax
- String: "options['delta']>0 and 'stockQuoteUp' or options['delta']<0 and 'stockQuoteDown'"
- Filename: /home/xen/src/work/ovt.buildout/src/collective.periodicportlet/collective/periodicportlet/stock.pt
- Location: (19:37)
PTRuntimeError: ['Compilation failed', u'chameleon.exc.ExpressionError: invalid syntax\n\n - String: "options['delta']>0 and 'stockQuoteUp' or options['delta']<0 and 'stockQuoteDown'"\n - Filename: /home/xen/src/work/ovt.buildout/src/collective.periodicportlet/collective/periodicportlet/stock.pt\n - Location: (19:37)']Here's the TB if I use "<" and ">"::
Failed example:
portal.restrictedTraverse('update_stock_portlet')(
assignment='plone.rightcolumn/bar-header')
Exception raised:
Traceback (most recent call last):
File "/home/xen/src/python/parts/opt/lib/python2.7/doctest.py", line 1254, in run
compileflags, 1) in test.globs
File "<doctest README.txt[16]>", line 2, in
assignment='plone.rightcolumn/bar-header')
File "/home/xen/src/work/ovt.buildout/src/collective.periodicportlet/collective/periodicportlet/stock.py", line 67, in __call
assign.text = self.index(*_quote)
File "/usr/local/lib/python/site-packages/Zope2-2.13.8-py2.7.egg/Products/Five/browser/pagetemplatefile.py", line 125, in call
return self.im_func(im_self, *args, *_kw)
File "/usr/local/lib/python/site-packages/Zope2-2.13.8-py2.7.egg/Products/Five/browser/pagetemplatefile.py", line 59, in call
sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
File "/usr/local/lib/python/site-packages/zope.pagetemplate-3.5.2-py2.7.egg/zope/pagetemplate/pagetemplate.py", line 107, in pt_render
raise PTRuntimeError(str(self._v_errors))
- Warning: Compilation failed
- Warning: chameleon.exc.ParseError: Unexpected end tag.- String: ""
- Filename: /home/xen/src/work/ovt.buildout/src/collective.periodicportlet/collective/periodicportlet/stock.pt
- Location: (28:2)
PTRuntimeError: ['Compilation failed', u'chameleon.exc.ParseError: Unexpected end tag.\n\n - String: ""\n - Filename: /home/xen/src/work/ovt.buildout/src/collective.periodicportlet/collective/periodicportlet/stock.pt\n - Location: (28:2)']I've tried various combinations of ">", "<", ">", "<", "lt" and "gt", all of which work without Chameleon but only "lt" and "gt_" work under chameleon. I'm using that workaround for now so I'm fine if you just want to close this ticket, but it is an incompatibility and I thought at least I should document it.
Reply to this email directly or view it on GitHub:
#32
from chameleon.
When I revert my workaround and use Chameleon from git and five.pt/trunk, I still get the error with Chameleon and not without.
from chameleon.
Related Issues (20)
- `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
- 4.5.2: test suite is part of the installed resources and some warnings HOT 5
- Result of use-macro is placed in the wrong position, when using i18n:translate
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.