Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#1201 closed defect (fixed)

Macro error when depth=X is used.

Reported by: verm Owned by: Christian Boos
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 17 years ago by Noah Kantrowitz

Owner: changed from Noah Kantrowitz to Christian Boos

comment:2 Changed 17 years ago by Christian Boos

Resolution: fixed
Status: newclosed

(In [1955]) Fixes #1201

comment:3 Changed 17 years ago by Christian Boos

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.