TypeError encountered with FoldMacroProcessorMacro

20 views
Skip to first unread message

Ray H

unread,
Mar 29, 2012, 6:51:35 PM3/29/12
to Trac Users
Am receiving the following error message when attempting to use the
Subject Macro for the first time.

TypeError: expand_macro() takes exactly 5 arguments (4 given)

Python Traceback
Most recent call last:
File "/usr/lib/python2.7/site-packages/trac/wiki/templates/
wiki_edit.html", line 56, in <Expression
u'wiki_to_html(context(page.resource), page.text)'>
File "/usr/lib/python2.7/site-packages/trac/wiki/formatter.py", line
1118, in format_to_html
File "/usr/lib/python2.7/site-packages/trac/wiki/formatter.py", line
1073, in generate
File "/usr/lib/python2.7/site-packages/trac/wiki/formatter.py", line
851, in format
File "/usr/lib/python2.7/site-packages/trac/wiki/formatter.py", line
780, in handle_code_block
File "/usr/lib/python2.7/site-packages/trac/wiki/formatter.py", line
180, in process
File "/usr/lib/python2.7/site-packages/trac/wiki/formatter.py", line
167, in _macro_processor

System Information:
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/
4.0; GTB7.3; bgft; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR
2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR
3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C)

Trac: 0.11.7
Python: 2.7.2 (default, Dec 19 2011, 09:40:10) [GCC 4.6.1 20110627
(Mandriva)]
setuptools: 0.6
pyPgSQL: 2.4
Genshi: 0.6
Pygments: 1.4
Subversion: 1.6.17 (r1128011)
SilverCity: 0.9.7
jQuery: 1.2.6

The following was entered onto the Sandbox page to generate this
error:

= The Sandbox =

This is just a page to practice and learn WikiFormatting.

Go ahead, edit it freely.

{{{
#!Fold title="A title for the folded section"
This section of the wiki page is folded up and can be expanded by
clicking on the title.

This can contain any ''formatted'' **wiki** content, including macros
and nested Fold sections.
}}}

Any help would be appreciated.

Patrick Schaaf

unread,
Mar 30, 2012, 4:28:08 AM3/30/12
to trac-...@googlegroups.com
On Thu, 2012-03-29 at 15:51 -0700, Ray H wrote:
> Am receiving the following error message when attempting to use the
> Subject Macro for the first time.
>
> TypeError: expand_macro() takes exactly 5 arguments (4 given)

Works on Trac 0.13dev. Does not work on Trac 0.11.6. Apparently there
was an internal API change in between.

best regards
Patrick

RjOllos

unread,
Jun 13, 2012, 1:50:17 PM6/13/12
to trac-...@googlegroups.com


On Friday, March 30, 2012 1:28:08 AM UTC-7, Patrick Schaaf wrote:

Works on Trac 0.13dev. Does not work on Trac 0.11.6. Apparently there
was an internal API change in between.

I've found the same for a similar macro. I think the issue with the FoldMacroProcessorMacro is most likely the same issue described here:
http://trac-hacks.org/ticket/8942#comment:2
 
Reply all
Reply to author
Forward
0 new messages