Modify

Opened 6 years ago

Closed 3 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 rjollos)

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 6 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 4 years ago by rjollos

  • Description modified (diff)

comment:3 Changed 3 years ago by rjollos

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

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

Add Comment

Modify Ticket

Action
as 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.