﻿ticket	summary	type	release	owner	status	created	modified	_description	_reporter
4738	RandomQuote(WikiPage) fails with TypeError: format requires a mapping	defect	0.11	RottenChester	new	2009-03-03T17:57:23+01:00	2009-03-03T17:57:23+01:00	"I'm using Trac 0.11 in Ubuntu 8.10.

{{{RandomQuote(WikiPage)}}} macro fails with {{{TypeError: format requires a mapping}}}

The same error happens with {{{RandomItem}}} macro.

{{{
TypeError: format requires a mapping
}}}

See stack trace below:

{{{
2009-03-03 18:16:42,123 Trac[formatter] ERROR: Macro RandomQuote(LitQuotes) 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-x86_64/egg/randominclude/randomquote.py"", line 41, in expand_macro
    pagelist = wikiobj.getentries(sourcepage,1)
  File ""build/bdist.linux-x86_64/egg/randominclude/randomwiki.py"", line 21, in getentries
    {'name':sourcepage,})
  File ""/usr/lib/python2.5/site-packages/trac/db/util.py"", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File ""/usr/lib/python2.5/site-packages/trac/db/sqlite_backend.py"", line 56, in execute
    sql = sql % (('?',) * len(args))
TypeError: format requires a mapping
}}}"	ilmars@…
