2013-03-21 51 views
0

我按照这个教程appy.pod,我创建字典列表的详细或类似这样的东西少:错误环路与“蟒蛇打开的文档”

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

,并在LibreOffice的 - 作家,我有注意到这个

do text for foo in reports 

,当我excecute代码中,我得到这个错误

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.

做一个音符,是否需要激活'音轨改变'模式?

有相关的另一个问题,但不为我工作 Comments are seen as empty, even though they're not

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

+0

这是一个实际的错误信息?哇。 – NPE 2013-03-21 18:42:46

+0

@NPE是的,可以在已经在libreoffice中生成的报告中看到Writer – jdurango 2013-03-21 18:45:45

+0

这是一个令人惊讶的表达,而不是难以置信的:) – NPE 2013-03-21 20:03:06

回答

2

的解决方案是在这里appy forum

什么荚版本做你用? 请注意,在Pypi上,不推荐使用包appy.pod和appy.shared。使用新的软件包。 加埃唐

那我所做的就是安装荚PIP安装和offcourse已过时,所以你必须从这里Download从appy.xxx.zip下载APPY并复制“APPY”文件夹中的“位点你的Python解释器的“包”文件夹。

+0

手动安装是不必要的,因为主开发人员建议你只需要安装“appy” – anddam 2014-01-16 14:31:41