Double quotes in ODT comments cause exception in Renderer

Bug #1213724 reported by Atis Straujums on 2013-08-18
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

To reproduce:
- create an ODT document with some paragraphs
- select one of them and add a comment, saying: do text if mydict["mybool"]
- in Python, pass this to the renderer as the context variable: {"mydict" : {"mybool":True}}

The expected behaviour is to see the paragraph printed in the output.

Instead, the Renderer crashes with the log output similar to this:

Traceback (most recent call last):
  File "C:\<irrelevant>.py", line 233, in <module>
  File "C:\Python27\lib\site-packages\appy\pod\", line 428, in run
  File "C:\Python27\lib\site-packages\appy\shared\", line 257, in p
  File "C:\Python27\lib\xml\sax\", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "C:\Python27\lib\xml\sax\", line 123, in parse
  File "C:\Python27\lib\xml\sax\", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "C:\Python27\lib\xml\sax\", line 304, in end_element
  File "C:\Python27\lib\site-packages\appy\pod\", line 333, in endE
  File "C:\Python27\lib\site-packages\appy\pod\", line 108, in execute, context, eRes)
  File "C:\Python27\lib\site-packages\appy\pod\", line 252, in do
    self.evaluateBuffer(result, context)
  File "C:\Python27\lib\site-packages\appy\pod\", line 112, in evaluat
    self.buffer.evaluate(result, context, removeMainElems=self.minus)
  File "C:\Python27\lib\site-packages\appy\pod\", line 678, in evaluat
    evalEntry.action.execute(result, context)
  File "C:\Python27\lib\site-packages\appy\pod\", line 105, in execute

    eRes,error = self.evaluateExpression(result, context, self.expr)
  File "C:\Python27\lib\site-packages\appy\pod\", line 88, in evaluate
    errorMessage = EVAL_ERROR % (expr, self.getExceptionLine(e))
  File "C:\Python27\lib\site-packages\appy\pod\", line 58, in getExcep
    return '%s.%s: %s' % (e.__module__, e.__class__.__name__, str(e))
AttributeError: 'exceptions.SyntaxError' object has no attribute '__module__'

Atis Straujums (atis-straujums) wrote :

Oh, forgot to add, that the error disappears if the ODT comment is rewritten to read like this: do text if mydict['mybool']

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers