Hello all,<br><div class="gmail_quote"><br>So, I just upgraded to Moin 1.7 last night.  I thought I ran thru a battery of tests of all the third-party macros I use on my test server, but evidently missed one: the SortBy macro.  We use this to sort a phone number table for our internal phone directory.  This macro worked perfectly in 1.6 (surviving the 1.5 to 1.6 upgrade unscathed), but there's some change in 1.7 that finally did it in.  I realize this is the third-party macro, but I'm hoping the fix will be an easy one (hence, why I'm sending it to the list).  The error:<br>

<br><br><h1>TypeError</h1>
<p>send_page() takes exactly 1 non-keyword argument (2 given)</p>
<p>If you want to report a bug, please save this page and  attach it to your bug report.</p>
<ul><li><a>Show debugging information</a>
</li><li><a href="http://moinmo.in/MoinMoinBugs" target="_blank">Report bug</a>
</li><li><a href="http://moinmo.in/FrontPage" target="_blank">Visit MoinMoin wiki</a>
</li></ul>
<div>

<div><h2>Traceback</h2>
<p>A problem occurred in a Python script.  Here is the
        sequence of function calls leading up to the error, in the
        order they occurred.</p>
<ol><li><p><a>d:\python25\Lib\site-packages\MoinMoin\request\__init__.py</a>
 in <b>run</b>
(self=<MoinMoin.request.request_fcgi.Request object at 0x0091D250>)</p>
<ol><li> 1304                          self.page.send_page()
</li><li> 1305                      else:
</li><li> 1306                          handler(self.page.page_name, self)
</li><li> 1307  
</li><li> 1308              # every action that didn't use to raise MoinMoinFinish must call this now:
</li></ol>
<ul><li><b>handler</b>
 = <function do_show at 0x010A7130></li><li><b>self</b>
 = <MoinMoin.request.request_fcgi.Request object at 0x0091D250></li><li>self.<b>page</b>
 = <MoinMoin.Page.Page object at 0x0091D2B0></li><li>self.page.<b>page_name</b>
 = u'PhoneList'</li></ul>
</li><li><p><a>d:\python25\Lib\site-packages\MoinMoin\action\__init__.py</a>
 in <b>do_show</b>
(pagename=u'PhoneList',
request=<MoinMoin.request.request_fcgi.Request object at
0x0091D250>, content_only=0, count_hit=1, cacheable=1, print_mode=0)</p>
<ol><li>  251              count_hit=count_hit,
</li><li>  252              print_mode=print_mode,
</li><li>  253              content_only=content_only,
</li><li>  254          )
</li><li>  255  
</li></ol>
<ul><li><b>content_only</b>
 = 0</li></ul>
</li><li><p><a>d:\python25\Lib\site-packages\MoinMoin\Page.py</a>
 in <b>send_page</b>
(self=<MoinMoin.Page.Page object at 0x010C3FB0>, **keywords={'content_only': 0, 'count_hit': 1, 'print_mode': 0})</p>
<ol><li> 1195                                     format_args=pi['formatargs'],
</li><li> 1196                                     do_cache=do_cache,
</li><li> 1197                                     start_line=pi['lines'])
</li><li> 1198  
</li><li> 1199              # check for pending footnotes
</li></ol>
<ul><li>start_line <i>undefined</i>
</li><li><b>pi</b> = {'acl':
<MoinMoin.security.AccessControlList instance at 0x009186C0>,
'format': 'wiki', 'formatargs': '', 'language': 'en', 'lines': 0}</li></ul>
</li><li><p><a>d:\python25\Lib\site-packages\MoinMoin\Page.py</a>
 in <b>send_page_content</b>
(self=<MoinMoin.Page.Page object at 0x010C3FB0>,
request=<MoinMoin.request.request_fcgi.Request object at
0x0091D250>, body=u"= The Cognitive Arts Phonelist =<font color="#c040c0">\n</font> . ~-500 Davis ...es on this list, go to the PhoneListData page.''<font color="#c040c0">\n</font>", format='wiki', format_args='', do_cache=1, **kw={'start_line': 0})</p>


<ol><li> 1283              try:
</li><li> 1284                  code = self.loadCache(request)
</li><li> 1285                  self.execute(request, parser, code)
</li><li> 1286              except Exception, e:
</li><li> 1287                  if not is_cache_exception(e):
</li></ol>
<ul><li><b>self</b>
 = <MoinMoin.Page.Page object at 0x010C3FB0></li><li>self.<b>execute</b>
 = <bound method Page.execute of <MoinMoin.Page.Page object at 0x010C3FB0>></li><li><b>request</b>
 = <MoinMoin.request.request_fcgi.Request object at 0x0091D250></li><li><b>parser</b>
 = <MoinMoin.parser.text_moin_wiki.Parser instance at 0x00918E40></li><li><b>code</b>
 = <code object <module> at 01109E30, file "PhoneList", line 2></li></ul>
</li><li><p><a>d:\python25\Lib\site-packages\MoinMoin\Page.py</a>
 in <b>execute</b>
(self=<MoinMoin.Page.Page object at 0x010C3FB0>,
request=<MoinMoin.request.request_fcgi.Request object at
0x0091D250>, parser=<MoinMoin.parser.text_moin_wiki.Parser
instance at 0x00918E40>, code=<code object <module> at
01109E30, file "PhoneList", line 2>)</p>
<ol><li> 1314                  __file__ = os.path.join(MoinMoin.__loader__.archive, 'dummy')
</li><li> 1315              try:
</li><li> 1316                  exec code
</li><li> 1317              except "CacheNeedsUpdate": # convert the exception
</li><li> 1318                  raise Exception("CacheNeedsUpdate")
</li></ol>
<ul><li><b>code</b>
 = <code object <module> at 01109E30, file "PhoneList", line 2></li></ul>
</li><li><p><a>d:\moin\PhoneList</a>
 in <b></b>
()</p>

</li><li><p><a>d:\python25\Lib\site-packages\MoinMoin\formatter\__init__.py</a>
 in <b>macro</b>
(self=<MoinMoin.formatter.text_html.Formatter instance at
0x00918968>, macro_obj=<MoinMoin.macro.Macro instance at
0x00918E18>, name=u'SortBy', args=u'PhoneListData,1,1,alpha',
markup=u'<<SortBy(PhoneListData,1,1,alpha)>>')</p>
<ol><li>  312          # call the macro
</li><li>  313          try:
</li><li>  314              return macro_obj.execute(name, args)
</li><li>  315          except ImportError, err:
</li><li>  316              errmsg = unicode(err)
</li></ol>
<ul><li><b>macro_obj</b>
 = <MoinMoin.macro.Macro instance at 0x00918E18></li><li>macro_obj.<b>execute</b>
 = <bound method Macro.execute of <MoinMoin.macro.Macro instance at 0x00918E18>></li><li><b>name</b>
 = u'SortBy'</li><li><b>args</b>
 = u'PhoneListData,1,1,alpha'</li></ul>
</li><li><p><a>d:\python25\Lib\site-packages\MoinMoin\macro\__init__.py</a>
 in <b>execute</b>
(self=<MoinMoin.macro.Macro instance at 0x00918E18>, macro_name=u'SortBy', args=u'PhoneListData,1,1,alpha')</p>
<ol><li>  126                  else:
</li><li>  127                      raise ImportError("Cannot load macro %s" % macro_name)
</li><li>  128          return execute(self, args)
</li><li>  129  
</li><li>  130      def _m_lang(self, text):
</li></ol>
<ul><li><b>execute</b>
 = <function execute at 0x00F3BC30></li><li><b>self</b>
 = <MoinMoin.macro.Macro instance at 0x00918E18></li><li><b>args</b>
 = u'PhoneListData,1,1,alpha'</li></ul>
</li><li><p><a>D:\Python25\lib\site-packages\MoinMoin\macro\SortBy.py</a>
 in <b>execute</b>
(macro=<MoinMoin.macro.Macro instance at 0x00918E18>, args=u'PhoneListData,1,1,alpha')</p>
<ol><li>  428          sort_page, table, num_headers, sort_list = process_args(args, macro.request)
</li><li>  429          for sort_column, sort_type, reverse in sort_list:
</li><li>  430              sort_table(table, num_headers, sort_column, sort_type, reverse)
</li><li>  431          return format(sort_page, macro, table)
</li><li>  432      except SortByError, e: return error(e.msg, args)
</li></ol>
<ul><li><i>global</i>
 <b>format</b>
 = <function format at 0x00F3BBF0></li><li><b>sort_page</b>
 = <MoinMoin.Page.Page object at 0x0091D610></li><li><b>macro</b>
 = <MoinMoin.macro.Macro instance at 0x00918E18></li><li><b>table</b>
 = [['<tablewidth="750px"rowbgcolor="#f1f1f1"><font color="#c040c0">\'\'\'</font>__Name__<font color="#c040c0">\'\'\'</font>
', "'''__Email__''' ", "'''__Phone__''' ", "'''__Cell__''' "], ['Joe User ', ' <a href="mailto:juser@example.com" target="_blank">juser@example.com</a> ', '555-555-5555',
'555-555-5555'], ['Joe Blow', ' <a href="mailto:jblow@example.com" target="_blank">jblow@example.com</a> ', '555-555-5555',
'555-555-5555'], ['...............this is sample data to protect privacy, but it gives you basic layout............ ' '], ...]</li></ul>
</li><li><p><a>D:\Python25\lib\site-packages\MoinMoin\macro\SortBy.py</a>
 in <b>format</b>
(sort_page=<MoinMoin.Page.Page object at 0x0091D610>,
macro=<MoinMoin.macro.Macro instance at 0x00918E18>,
table=[['<tablewidth="750px"rowbgcolor="#f1f1f1"><font color="#c040c0">\'\'\'</font>__Name__<font color="#c040c0">\'\'\'</font>
', "'''__Email__''' ", "'''__Phone__''' ", "'''__Cell__''' "], ['1
boardroom ', ' ', '847-563-5001 ', ' '], ['2 west huddle room ', ' ',
'847-425-8502 ', ' '], ['3 south huddle room ', ' ', '847-563-5013 ', '
'], ['Joe User ', ' <a href="mailto:juser@example.com" target="_blank">juser@example.com</a> ', '555-555-5555',
'555-555-5555'], ['Joe Blow', ' <a href="mailto:jblow@example.com" target="_blank">jblow@example.com</a> ', '555-555-5555',
'555-555-5555'], ['...............this is sample data to protect privacy, but it gives you basic layout............ '], ' '], ...])</p>
<ol><li>  402      stdout = sys.stdout
</li><li>  403      sys.stdout = StringIO.StringIO()
</li><li>  404      sort_page.send_page(macro.request, content_only=1)
</li><li>  405      ret += sys.stdout.getvalue()
</li><li>  406      sys.stdout = stdout
</li></ol>
<ul><li><b>sort_page</b>
 = <MoinMoin.Page.Page object at 0x0091D610></li><li>sort_page.<b>send_page</b>
 = <bound method Page.send_page of <MoinMoin.Page.Page object at 0x0091D610>></li><li><b>macro</b>
 = <MoinMoin.macro.Macro instance at 0x00918E18></li><li>macro.<b>request</b>
 = <MoinMoin.request.request_fcgi.Request object at 0x0091D250></li><li>content_only <i>undefined</i>
</li></ul>
</li></ol>
<div><h3>TypeError</h3>
<p>send_page() takes exactly 1 non-keyword argument (2 given)</p>
<ul><li>args = ('send_page() takes exactly 1 non-keyword argument (2 given)',)</li><li>message = 'send_page() takes exactly 1 non-keyword argument (2 given)'</li></ul>
</div>
</div>
<h2>System Details</h2>
<ul><li>Date: Tue, 24 Jun 2008 15:48:56 +0000</li><li>Platform: win32 (nt)</li><li>Python: Python 2.5.1 (D:\Python25\python.exe)</li><li>MoinMoin: Release 1.7.0 (release)</li></ul>
</div><br></div><br>