Opened 7 years ago

Closed 7 years ago

#1610 closed enhancement (invalid)

Can't install TocMacro plugin

Reported by: w@… Owned by: coderanger
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 7 years ago by yadnom@…

dear all,

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

best regards from berlin,

comment:2 Changed 7 years ago by athomas

  • Owner changed from athomas to coderanger

comment:3 Changed 7 years ago by yadnom@…

  • Resolution set to invalid
  • Status changed from new to closed
  • Type changed from defect to enhancement

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

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.