Opened 12 years ago

Closed 11 years ago

#762 closed defect (worksforme)

Toc error -1

Reported by: anonymous Owned by: Noah Kantrowitz
Priority: high Component: TocMacro
Severity: blocker Keywords:
Cc: Trac Release: 0.10


With upgrade to Trac 0.10, the TocMacro stop to work.

The follow error is showed: Error: Macro TOC(heading=Conteúdo) failed


Below a debug log...

2006-10-04 12:15:41,757 Trac[formatter] DEBUG: Executing Wiki macro TOC by provider <tractoc.macro.TracTocMacro object at
2006-10-04 12:15:41,761 Trac[formatter] ERROR: Macro TOC(heading=Conteúdo) failed
Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/trac/wiki/", line 439, in _macro_formatter
    return macro.process(self.req, args, True)
  File "/usr/lib/python2.3/site-packages/trac/wiki/", line 112, in process
    text = self.processor(req, text)
  File "/usr/lib/python2.3/site-packages/trac/wiki/", line 100, in _macro_processor
    return self.macro_provider.render_macro(req,, text)
  File "build/bdist.linux-i686/egg/tractoc/", line 188, in render_macro
  File "build/bdist.linux-i686/egg/tractoc/", line 25, in format
  File "/usr/lib/python2.3/site-packages/trac/wiki/", line 822, in format
    result = re.sub(, self.replace, line)
  File "/usr/lib/python2.3/", line 143, in sub
    return _compile(pattern, 0).sub(repl, string, count)
  File "/usr/lib/python2.3/site-packages/trac/wiki/", line 768, in replace
    replacement = self.handle_match(fullmatch)
  File "/usr/lib/python2.3/site-packages/trac/wiki/", line 764, in handle_match
    return internal_handler(match, fullmatch)
  File "build/bdist.linux-i686/egg/tractoc/", line 53, in _heading_formatter
KeyError: -1

Attachments (0)

Change History (4)

comment:1 Changed 12 years ago by Alec Thomas

Owner: changed from Alec Thomas to Noah Kantrowitz

comment:2 Changed 12 years ago by anonymous

Severity: normalblocker

i can confirm this error. toc for trac 0.10 is not working.

comment:3 Changed 12 years ago by Noah Kantrowitz

#924 has been marked as a duplicate of this ticket.

comment:4 Changed 11 years ago by Christian Boos

Resolution: worksforme
Status: newclosed

Well, that was probably the 0.9 version of the TocMacro. It has since be fixed to properly support unicode.

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.