Python鳟鱼

2024-09-30 00:24:48 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在运行aap应用程序。版本是1.076(尝试更高版本)。所有命令都会向我发送如下错误:

> Traceback (most recent call last):  
> File "/usr/bin/aap", line 10, in
> <module>
>     import Main   File "/usr/share/aap/Main.py", line 14, in
> <module>
>     from DoAddDef import doadddef   File "/usr/share/aap/DoAddDef.py",
> line 10, in <module>
>     from Action import find_primary_action   File
> "/usr/share/aap/Action.py", line 30,
> in <module>
>     from Dictlist import listitem2str, str2dictlist, dictlist2str   File
> "/usr/share/aap/Dictlist.py", line 18,
> in <module>
>     from Process import recipe_error   File "/usr/share/aap/Process.py", line
> 13, in <module>
>     from Work import setrpstack   File "/usr/share/aap/Work.py", line 25, in
> <module>
>     from Node import Node   File "/usr/share/aap/Node.py", line 10, in
> <module>
>     import Filetype   File "/usr/share/aap/Filetype.py", line
> 1417
>     as = 0
>      ^ SyntaxError: invalid syntax

会有什么问题?你知道吗


Tags: infrompyimport版本nodesharemain
2条回答

as是Python中的reserved word。你知道吗

似乎aap应用程序是为Python2.5及以下版本编写的:

Changed in version 2.5: Both as and with are only recognized when the with_statement future feature has been enabled. It will always be enabled in Python 2.6. See section The with statement for details. Note that using as and with as identifiers will always issue a warning, even when the with_statement future directive is not in effect.

在Python中,as是一个保留字。所以,这不能用在文件类型.py作为变量名。你知道吗

请尝试更新aap的安装或写入aap作者/论坛。你知道吗

相关问题 更多 >

    热门问题