Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#1201 closed defect (fixed)

Macro error when depth=X is used.

Reported by: verm Owned by: cboos
Priority: normal Component: TocMacro
Severity: major Keywords:
Cc: trachacks@… Trac Release: 0.11

Description

I'm currently running head and I've updated to the latest (0.11) version of TocMacro, any page that uses the depth=X parameter gives me this error:

Error: Macro TOC(inline, heading=Table of Contents, Timing, depth=3) failed
list assignment index out of range

Here's the line I'm using to call it:

[[TOC(inline, heading=Table of Contents, Timing, depth=3)]]

And DEBUG information from the trac log file:

2007-02-09 12:37:48,321 Trac[formatter] DEBUG: Executing Wiki macro TOC by provider <tractoc.macro.TOCMacro object at 0x8eb514c>
2007-02-09 12:37:48,462 Trac[formatter] ERROR: Macro TOC(inline, heading=Table of Contents, Timing, depth=3) failed
Traceback (most recent call last):
  File "/usr/local/lib/python2.4/site-packages/trac/wiki/formatter.py", line 454, in _macro_formatter
    return macro.process(args, in_paragraph=True)
  File "/usr/local/lib/python2.4/site-packages/trac/wiki/formatter.py", line 128, in process
    text = self.processor(text)
  File "/usr/local/lib/python2.4/site-packages/trac/wiki/formatter.py", line 115, in _macro_processor
    text)
  File "build/bdist.freebsd-5.3-STABLE-i386/egg/tractoc/macro.py", line 142, in expand_macro
  File "build/bdist.freebsd-5.3-STABLE-i386/egg/tractoc/macro.py", line 186, in _render_page_outline
  File "build/bdist.freebsd-5.3-STABLE-i386/egg/tractoc/macro.py", line 41, in outline_tree
IndexError: list assignment index out of range

This is python 2.4.2, mod_python 3.1.4 and apache 2.0.55

Attachments (0)

Change History (3)

comment:1 Changed 7 years ago by coderanger

  • Owner changed from coderanger to cboos

comment:2 Changed 7 years ago by cboos

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

(In [1955]) Fixes #1201

comment:3 Changed 7 years ago by cboos

verm, sorry for the late fix, Friday evening is already a long time ago now ;)

If you update to r1955, be sure to use a recent Trac 0.11dev (see r1954).
Otherwise, just locally apply the r1955 fix without the r1954 change.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from cboos. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.