Modify

Opened 16 years ago

Closed 14 years ago

#4124 closed defect (fixed)

IndexError: list index out of range

Reported by: anonymous Owned by: gruenebe
Priority: normal Component: NoteBoxMacro
Severity: major Keywords:
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

Receive the following error when using the plugin.

2008-11-19 12:35:30,159 Trac[formatter] ERROR: Macro NoteBox(tip,Lab Notifications:  No notifications at this time.) failed
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/trac/wiki/formatter.py", line 468, in _macro_formatter
    return macro.process(args, in_paragraph=True)
  File "/usr/lib/python2.5/site-packages/trac/wiki/formatter.py", line 179, in process
    text = self.processor(text)
  File "/usr/lib/python2.5/site-packages/trac/wiki/formatter.py", line 166, in _macro_processor
    text)
  File "build/bdist.linux-i686/egg/notebox/notebox.py", line 67, in expand_macro
    Formatter(formatter.env, formatter.context).format(args[1], out)
IndexError: list index out of range

Attachments (0)

Change History (3)

comment:1 Changed 16 years ago by luke@…

It appears the problem is splitting the args string by ', ' rather than ',' which means if you have [[NoteBox(tip,blah blah blah)]] it does not recognize this as a 2 element list and you get the error. See line 62 of notepad.py: args = args.split(', ',1)

comment:2 Changed 14 years ago by Ryan J Ollos

Description: modified (diff)

comment:3 Changed 14 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

(In [10070]) Fixes #4124: Use parse_args from Trac API to improve robustness of allowed arguments with regard to whitespace.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain gruenebe.
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.