Modify

Opened 17 years ago

Last modified 4 years ago

#1914 new defect

Syntax error in parser.py during install

Reported by: zack.carter@… Owned by:
Priority: normal Component: MediaWikiPluginMacro
Severity: normal Keywords: install
Cc: Trac Release: 0.10

Description

I attempt to install with easy_install (also tried manually, same result) and this happens:

$ easy_install http://trac-hacks.org/svn/mediawikipluginmacro
Downloading http://trac-hacks.org/svn/mediawikipluginmacro
Doing subversion checkout from http://trac-hacks.org/svn/mediawikipluginmacro to /tmp/easy_install-GtAx7m/mediawikipluginmacro
Processing mediawikipluginmacro
Running setup.py -q bdist_egg --dist-dir /tmp/easy_install-GtAx7m/mediawikipluginmacro/egg-dist-tmp-jv5QSo
  File "build/bdist.linux-i686/egg/mediawiki/parser.py", line 923
    return u'/'.join(slugifyBit(t) for t in text.split(u'/'))
                                     ^
SyntaxError: invalid syntax
zip_safe flag not set; analyzing archive contents...
TracMediaWikiMacro 1.0 is already the active version in easy-install.pth

Installed /usr/lib/python2.3/site-packages/TracMediaWikiMacro-1.0-py2.3.egg
Processing dependencies for TracMediaWikiMacro==1.0
Finished processing dependencies for TracMediaWikiMacro==1.0

I'm running Python 2.3. It says it installed but doesn't show up in Trac, maybe because of the error? I edited trac.ini and restarted the server beforehand, of course.

Attachments (0)

Change History (4)

comment:1 Changed 17 years ago by anonymous

Owner: changed from permon to anonymous
Status: newassigned

I don't have access to python 2.3 anymore. I think, that there is a problem with list comprehension. With python 2.5 everything works fine. Try to rewrite slugify function with no list comprehension. Maybe it could work. Something like:

def slugify(text):
    list = []
    for t in text.split(u'/'):
        list.append(slugifyBit(t))
    return u'/'.join(list)

comment:2 Changed 17 years ago by anonymous

Owner: changed from anonymous to permon
Status: assignednew

comment:3 in reply to:  1 Changed 17 years ago by anonymous

The above rewrite of slugify appears to work for me

comment:4 Changed 4 years ago by Ryan J Ollos

Owner: permon deleted

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.