GithubHelp home page GithubHelp logo

Comments (2)

malthe avatar malthe commented on May 27, 2024

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.

rpatterson avatar rpatterson commented on May 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.