0

我正在关注本教程appy.pod并且我正在创建一个或多或少的 dict 列表,如下所示:

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

在 libreoffice - writer 我有一个注释

do text for foo in reports

当我执行代码时出现此错误

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.

要记笔记,是否需要激活“跟踪更改”模式?

还有另一个相关的问题,但对我不起作用 评论被视为空,即使它们不是

有人可以帮助我,我有什么错

4

1 回答 1

2

解决方案在这里appy论坛

你使用什么 pod 版本?请注意,在 Pypi 上,包 appy.pod 和 appy.shared 已被弃用。使用新的应用程序包。盖坦

我所做的是使用 pip install 安装 pod 并且不推荐使用 offcourse,因此您必须从此处下载 appy 下载并将“appy”文件夹从 appy.xxx.zip 复制到 Python 解释器的“site-packages”文件夹中。

于 2013-03-22T15:25:43.343 回答