Opened 8 years ago

Closed 6 years ago

#7838 closed defect (worksforme)

Error: Macro TOC(None) failed

Reported by: anonymous Owned by: Noah Kantrowitz
Priority: normal Component: TocMacro
Severity: normal Keywords:
Cc: megha@… Trac Release: 0.12

Description (last modified by Ryan J Ollos)


I,m new to trac and i have backup trac environment from 0.10.5 and restored to 0.12.

Now there is a TOC macro error

Error: Macro TOC(None) failed
__init__() takes exactly 3 arguments (2 given)

This is the content on trac.log

2010-10-15 19:30:39,966 Trac[formatter] DEBUG: Executing Wiki macro TOC by provider <toc.TOCMacro object at 0x8ff662c>
2010-10-15 19:30:39,966 Trac[macros] WARNING: Executing pre-0.11 Wiki macro TOC by provider <class 'toc.TOCMacro'>
2010-10-15 19:30:39,969 Trac[formatter] ERROR: Macro TOC(None) failed: 
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/wiki/", line 710, in _macro_formatter
    return macro.process(args, in_paragraph=True)
  File "/usr/lib/python2.4/site-packages/trac/wiki/", line 304, in process
    text = self.processor(text)
  File "/usr/lib/python2.4/site-packages/trac/wiki/", line 291, in _macro_processor
  File "/usr/lib/python2.4/site-packages/trac/wiki/", line 66, in expand_macro
    return self.render_macro(formatter.req, name, content)
  File "/opt/projectswiki/Video/OmniVSDP/plugins/", line 82, in render_macro
    formatter = MyOutlineFormatter(self.env) # FIXME 0.11: give 'req'
TypeError: __init__() takes exactly 3 arguments (2 given)
2010-10-15 19:30:39,971 Trac[formatter] DEBUG: Executing Wiki macro Image by provider < object at 0x8ff6c8c>
2010-10-15 19:30:39,980 Trac[formatter] DEBUG: Executing Wiki macro Image by provider < object at 0x8ff6c8c>


Attachments (0)

Change History (3)

comment:1 Changed 7 years ago by anonymous

Cc: megha@… added; anonymous removed

I'm having the same error:

Tried these fixes mentioned here:

TracAccountManager 0.3.2
TracNav 4.1
TracTocMacro 1.0

this is my trac config:
Trac: 	0.11.7
Python: 	2.6.6rc1+ (r266rc1:83691, Aug 5 2010, 17:21:34) [GCC 4.4.5 20100728 (prerelease)]
setuptools: 	0.6
SQLite: 	3.7.2
pysqlite: 	2.4.1
Genshi: 	0.6
mod_wsgi: 	3.3 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})
Pygments: 	1.3.1
RPC: 	1.1.0-r8688
jQuery:	1.4.2

comment:2 Changed 6 years ago by Ryan J Ollos

Description: modified (diff)

comment:3 Changed 6 years ago by osimons

Resolution: worksforme
Status: newclosed

Let's close this. The traceback obviously refers to an old and incompatible version of the plugin, as the is nowhere to be found in current source.

If updating Trac from 0.10 to 0.11/0.12, the plugin must also be updated. See TocMacro#Installation

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.