Opened 11 years ago

Closed 11 years ago

#1610 closed enhancement (invalid)

Can't install TocMacro plugin

Reported by: w@… Owned by: Noah Kantrowitz
Priority: normal Component: TocMacro
Severity: normal Keywords:
Cc: Trac Release: 0.10


When trying to load the TocMacro plugin, Trac fails with the following error (from the log file):

ImportError: cannot import name parse_args

Below I've detailed my steps to install and run the plugin.

First I've downloaded and build the TocMacro egg the following way:

[~]# fetch -o ""
[~]# tar -xzf
[~]# cd tocmacro/0.11/
[~/tocmacro/0.11/]# python bdist_egg

Then I ran easy_install to make the plugin available from all Trac projects:

[~/tocmacro/0.11/]# cd dist
[~/tocmacro/0.11/dist]# easy_install TracTocMacro-
/usr/local/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/setuptools/command/ UserWarning: Unbuilt egg for tocmacro [unknown version] (/usr/local/lib/python2.4/site-packages/tocmacro.egg)
/usr/local/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/setuptools/ UserWarning: Unbuilt egg for tocmacro [unknown version] (/usr/local/lib/python2.4/site-packages/tocmacro.egg)
/usr/local/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/setuptools/command/ UserWarning: Unbuilt egg for tocmacro [unknown version] (/usr/local/lib/python2.4/site-packages/tocmacro.egg)
  self.local_index = Environment(self.shadow_path+sys.path)
Processing TracTocMacro-
Removing /usr/local/lib/python2.4/site-packages/TracTocMacro-
Copying TracTocMacro- to /usr/local/lib/python2.4/site-packages
TracTocMacro is already the active version in easy-install.pth

Installed /usr/local/lib/python2.4/site-packages/TracTocMacro-
Processing dependencies for TracTocMacro==

To be on the safe side I also restarted Apache.

When I now looked in my trac.log file (which is set to DEBUG) I saw that it complained about not having the Genshi Python toolkit. I downloaded and installed version 0.4.1 from their Subversion repository, but now I instead got the following error in my trac.log file:

2007-06-05 15:08:37,679 Trac[loader] DEBUG: Loading egg plugin tractoc.macro from /usr/local/lib/python2.4/site-packages/TracTocMacro-
2007-06-05 15:08:37,693 Trac[loader] ERROR: Failed to load plugin tractoc.macro from /usr/local/lib/python2.4/site-packages/TracTocMacro-
Traceback (most recent call last):
  File "/usr/local/lib/python2.4/site-packages/trac/", line 101, in load_components
  File "/usr/local/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/", line 1830, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "build/bdist.freebsd-6.2-RELEASE-i386/egg/tractoc/", line 10, in ?
ImportError: cannot import name parse_args

As far as I can see, parse_args is a method on the Python optparse command line parser. And as far as I can see I've also got it installed:

[~]# locate optparse

Attachments (0)

Change History (3)

comment:1 Changed 11 years ago by yadnom@…

dear all,

i have exactly the same problem ... what is wrong ?

best regards from berlin, Yadnom

comment:2 Changed 11 years ago by Alec Thomas

Owner: changed from Alec Thomas to Noah Kantrowitz

comment:3 Changed 11 years ago by yadnom@…

Resolution: invalid
Status: newclosed
Type: defectenhancement

k, i have take the wrong version :/ i used trac v0.10.x and i have take 0.11

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.