id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,branch,changelog,apichanges,internalchanges
11181,internal error with TracIni macro,Christian Boos,Christian Boos,"Found the following error while looking in the trac.log:
{{{
[pid 18612 139956728231680] 2013-05-06 12:38:33,999 Trac[formatter] ERROR: Macro TracIni(None) failed:
Traceback (most recent call last):
File ""/usr/local/virtualenv/1.1dev/lib/python2.6/site-packages/Trac-1.1.2dev_r11794-py2.6.egg/trac/wiki/formatter.py"", line 765, in _macro_formatter
return macro.ensure_inline(macro.process(args))
File ""/usr/local/virtualenv/1.1dev/lib/python2.6/site-packages/Trac-1.1.2dev_r11794-py2.6.egg/trac/wiki/formatter.py"", line 356, in process
text = self.processor(text)
File ""/usr/local/virtualenv/1.1dev/lib/python2.6/site-packages/Trac-1.1.2dev_r11794-py2.6.egg/trac/wiki/formatter.py"", line 343, in _macro_processor
text)
File ""/usr/local/virtualenv/1.1dev/lib/python2.6/site-packages/Trac-1.1.2dev_r11794-py2.6.egg/trac/wiki/macros.py"", line 784, in expand_macro
for section, section_doc in sorted(sections.iteritems()))
File ""/usr/local/virtualenv/1.1dev/lib/python2.6/site-packages/Genshi-0.7dev_r1134-py2.6.egg/genshi/builder.py"", line 261, in __call__
Fragment.__call__(self, *args)
File ""/usr/local/virtualenv/1.1dev/lib/python2.6/site-packages/Genshi-0.7dev_r1134-py2.6.egg/genshi/builder.py"", line 97, in __call__
self.append(arg)
File ""/usr/local/virtualenv/1.1dev/lib/python2.6/site-packages/Genshi-0.7dev_r1134-py2.6.egg/genshi/builder.py"", line 129, in append
for child in node:
File ""/usr/local/virtualenv/1.1dev/lib/python2.6/site-packages/Trac-1.1.2dev_r11794-py2.6.egg/trac/wiki/macros.py"", line 784, in
"" % _markup_to_unicode(text) File ""/usr/local/virtualenv/1.1dev/lib/python2.6/site-packages/Trac-1.1.2dev_r11794-py2.6.egg/trac/wiki/formatter.py"", line 107, in _markup_to_unicode markup = stream.render('xhtml', encoding=None, strip_whitespace=False) File ""/usr/local/virtualenv/1.1dev/lib/python2.6/site-packages/Genshi-0.7dev_r1134-py2.6.egg/genshi/core.py"", line 183, in render return encode(generator, method=method, encoding=encoding, out=out) File ""/usr/local/virtualenv/1.1dev/lib/python2.6/site-packages/Genshi-0.7dev_r1134-py2.6.egg/genshi/output.py"", line 57, in encode return _encode(''.join(list(iterator))) MemoryError: }}} No idea yet how that was triggered. By looking at the access.log, it seems there's always a TracIni access around the same time, although going to that page doesn't show an issue. Must have been under a specific locale... yes ;-) There's a recursion in [source:trunk/trac/locale/ko/LC_MESSAGES/tracini.po@11794#L285] due to the use of `[[TracIni]]` instead of a simple `TracIni` like in the original. IIRC, when deciding what to do for `[[X]]` when `X` is both a macro and a wiki page, I opted for a macro call for being backward compatible. So I think that not expanding `[[TracIni()]]` while already in a `[[TracIni()]]` expansion is the best fix here. ",defect,closed,normal,1.0.2,i18n,1.0dev,minor,fixed,renderingcontext macros,,,"Modify .po files to expand `TracIni` to a wiki page link rather than a macro call, fixing a recursion in the TracIni macro documentation.",,