Opened 10 years ago

Closed 10 years ago

#762 closed defect (worksforme)

Toc error -1

Reported by: anonymous Owned by: coderanger
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 10 years ago by athomas

  • Owner changed from athomas to coderanger

comment:2 Changed 10 years ago by anonymous

  • Severity changed from normal to blocker

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

comment:3 Changed 10 years ago by coderanger

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

comment:4 Changed 10 years ago by cboos

  • Resolution set to worksforme
  • Status changed from new to closed

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

Add Comment

Modify Ticket

as closed The owner will remain coderanger.
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.