tags:

views:

36

answers:

2

Hello, i'm trying to run aap-application. Version is 1.076 (tried higher). All commands send me an error like:

> 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

What problem could it be?

+3  A: 

as is a reserved word in Python.

Seems aap-application was written for Python 2.5 and bellow:

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.

voyager
+5  A: 

Well, as is a reserved word in Python. So, that can't be used in FileType.py as a variable name.

Try updating your installation of aap or writing in to the aap authors/forums.

ars
I used different versions of software. Okay, i'll send message to developers
Ockonal