error in loop with for

Asked by Jesid Durango Isaza on 2013-03-21

I'm creating a list of dict more or less something like this:

"params['reports'] = [{'date': foo.date, 'name': foo.name} for foo in something]"

and in the libreoffice - writer i have a note with this

"do text for foo in reports"

and when I excecute the code i get this error

Syntax error while parsing a note whose content is "[]". In a note, you may specify at most 2 lines: a pod statement and a "from" clause. A Pod statement has the form: do {element} [{command} {expression}]. {element} identifies the part of the document that will be impacted by the command. It must be one of ('text', 'title', 'section', 'table', 'row', 'cell'). Optional {command} can be "if" (conditional inclusion of the element) or "for" (multiple inclusion of the element). For an "if" command, {expression} is any Python expression. For a "for" command, {expression} must be of the form: {name} in {expression}. {name} must be a Python variable name. It is the name of the iteration variable. {expression} is a Python expression that, when evaluated, produces a Python sequence (tuple, string, list, etc). A "from" clause has the form: from {expression}, where {expression} is a Python expression that, when evaluated, produces a valid chunk of odt content that will be inserted instead of the element that is the target of the note.

to make a note, is necessary active the 'track changes' mode?

there is another question related but that do not work for me
https://answers.launchpad.net/appy/+question/139478

somebody can help me, what I have wrong

Question information

Language:
English Edit question
Status:
Solved
For:
Appy Edit question
Assignee:
No assignee Edit question
Solved by:
Gaëtan Delannay
Solved:
2013-03-23
Last query:
2013-03-23
Last reply:
2013-03-22

Hello,
What pod version do you use?
Note that, on Pypi, packages appy.pod and appy.shared are deprecated. Use new package appy.
Gaetan

Oh!, thank you very much that was the solution I download the appy here https://pypi.python.org/pypi/appy and copy the appy folder to site-packages of my interpreter, I did was install pod with pip.

Thanks Gaëtan Delannay, that solved my question.