Attachment 'traceback6.html'

Download

--> -->

TypeError

object of type 'generator' has no len()

If you want to report a bug, please save this page and attach it to your bug report.

Traceback

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

  1. /home/user/workspace/1.8-mercurialbackend-ppacana/MoinMoin/request/__init__.py in run (self=<MoinMoin.request.request_standalone.Request object at 0x16f1390>)

    1. 1302 self.page.send_page()
    2. 1303 else:
    3. 1304 handler(self.page.page_name, self)
    4. 1305
    5. 1306 # every action that didn't use to raise MoinMoinFinish must call this now:
    • handler = <function execute at 0x1713410>
    • self = <MoinMoin.request.request_standalone.Request object at 0x16f1390>
    • self.page = <MoinMoin.Page.Page object at 0x16f1dd0>
    • self.page.page_name = u'SystemInfo'
  2. /home/user/workspace/1.8-mercurialbackend-ppacana/MoinMoin/action/login.py in execute (pagename=u'SystemInfo', request=<MoinMoin.request.request_standalone.Request object at 0x16f1390>)

    1. 16
    2. 17 def execute(pagename, request):
    3. 18 return LoginHandler(pagename, request).handle()
    4. 19
    5. 20 class LoginHandler:
    • global LoginHandler = <class MoinMoin.action.login.LoginHandler at 0x17190b0>
    • pagename = u'SystemInfo'
    • request = <MoinMoin.request.request_standalone.Request object at 0x16f1390>
    • ).handle undefined
  3. /home/user/workspace/1.8-mercurialbackend-ppacana/MoinMoin/action/login.py in handle (self=<MoinMoin.action.login.LoginHandler instance at 0x15147a0>)

    1. 72 error = ''.join(error)
    2. 73 request.theme.add_msg(error, "error")
    3. 74 return self.page.send_page()
    4. 75
    5. 76 else: # show login form
    • self = <MoinMoin.action.login.LoginHandler instance at 0x15147a0>
    • self.page = <MoinMoin.Page.Page object at 0x16f1e10>
    • self.page.send_page = <bound method Page.send_page of <MoinMoin.Page.Page object at 0x16f1e10>>
  4. /home/user/workspace/1.8-mercurialbackend-ppacana/MoinMoin/Page.py in send_page (self=<MoinMoin.Page.Page object at 0x16f1e10>, **keywords={})

    1. 982 format_args=pi['formatargs'],
    2. 983 do_cache=do_cache,
    3. 984 start_line=pi['lines'])
    4. 985
    5. 986 # check for pending footnotes
    • start_line undefined
    • pi = {'format': 'wiki', 'formatargs': '', 'language': 'en', 'lines': 10}
  5. /home/user/workspace/1.8-mercurialbackend-ppacana/MoinMoin/Page.py in send_page_content (self=<MoinMoin.Page.Page object at 0x16f1e10>, request=<MoinMoin.request.request_standalone.Request object at 0x16f1390>, body=u'<<SystemInfo>>\n', format='wiki', format_args='', do_cache=1, **kw={'start_line': 10})

    1. 1065
    2. 1066 if not (do_cache and self.canUseCache(Parser)):
    3. 1067 self.format(parser)
    4. 1068 else:
    5. 1069 try:
    • self = <MoinMoin.Page.Page object at 0x16f1e10>
    • self.format = <bound method Page.format of <MoinMoin.Page.Page object at 0x16f1e10>>
    • parser = <MoinMoin.parser.text_moin_wiki.Parser instance at 0x170fa28>
  6. /home/user/workspace/1.8-mercurialbackend-ppacana/MoinMoin/Page.py in format (self=<MoinMoin.Page.Page object at 0x16f1e10>, parser=<MoinMoin.parser.text_moin_wiki.Parser instance at 0x170fa28>)

    1. 1086 def format(self, parser):
    2. 1087 """ Format and write page content without caching """
    3. 1088 parser.format(self.formatter)
    4. 1089
    5. 1090 def execute(self, request, parser, code):
    • parser = <MoinMoin.parser.text_moin_wiki.Parser instance at 0x170fa28>
    • parser.format = <bound method Parser.format of <MoinMoin.parser.text_moin_wiki.Parser instance at 0x170fa28>>
    • self = <MoinMoin.Page.Page object at 0x16f1e10>
    • self.formatter = <MoinMoin.formatter.text_html.Formatter instance at 0x170f560>
  7. /home/user/workspace/1.8-mercurialbackend-ppacana/MoinMoin/parser/text_moin_wiki.py in format (self=<MoinMoin.parser.text_moin_wiki.Parser instance at 0x170fa28>, formatter=<MoinMoin.formatter.text_html.Formatter instance at 0x170f560>, inhibit_p=False)

    1. 1541
    2. 1542 # Scan line, format and write
    3. 1543 formatted_line = self.scan(line, inhibit_p=inhibit_p)
    4. 1544 self.request.write(formatted_line)
    5. 1545
    • formatted_line undefined
    • self = <MoinMoin.parser.text_moin_wiki.Parser instance at 0x170fa28>
    • self.scan = <bound method Parser.scan of <MoinMoin.parser.text_moin_wiki.Parser instance at 0x170fa28>>
    • line = u'<<SystemInfo>> '
    • inhibit_p = False
  8. /home/user/workspace/1.8-mercurialbackend-ppacana/MoinMoin/parser/text_moin_wiki.py in scan (self=<MoinMoin.parser.text_moin_wiki.Parser instance at 0x170fa28>, line=u'<<SystemInfo>> ', inhibit_p=False)

    1. 1357 self.in_table or self.in_list):
    2. 1358 result.append(self.formatter.paragraph(1, css_class="line867"))
    3. 1359 result.append(self.replace(match, inhibit_p))
    4. 1360 end = match.end()
    5. 1361 lastpos = end
    • result = ['<p class="line867">']
    • result.append = <built-in method append of list object at 0x170ff80>
    • self = <MoinMoin.parser.text_moin_wiki.Parser instance at 0x170fa28>
    • self.replace = <bound method Parser.replace of <MoinMoin.parser.text_moin_wiki.Parser instance at 0x170fa28>>
    • match = <_sre.SRE_Match object at 0x17aa2e0>
    • inhibit_p = False
  9. /home/user/workspace/1.8-mercurialbackend-ppacana/MoinMoin/parser/text_moin_wiki.py in replace (self=<MoinMoin.parser.text_moin_wiki.Parser instance at 0x170fa28>, match=<_sre.SRE_Match object at 0x17aa2e0>, inhibit_p=False)

    1. 1399 # Get replace method and replace hit
    2. 1400 replace_func = getattr(self, '_%s_repl' % type)
    3. 1401 result.append(replace_func(hit, match.groupdict()))
    4. 1402 return ''.join(result)
    5. 1403 else:
    • result = []
    • result.append = <built-in method append of list object at 0x170f3b0>
    • replace_func = <bound method Parser._macro_repl of <MoinMoin.parser.text_moin_wiki.Parser instance at 0x170fa28>>
    • hit = u'SystemInfo'
    • match = <_sre.SRE_Match object at 0x17aa2e0>
    • match.groupdict = <built-in method groupdict of _sre.SRE_Match object at 0x17aa2e0>
  10. /home/user/workspace/1.8-mercurialbackend-ppacana/MoinMoin/parser/text_moin_wiki.py in _macro_repl (self=<MoinMoin.parser.text_moin_wiki.Parser instance at 0x170fa28>, word=u'SystemInfo', groups={u'big': None, u'big_off': None, u'big_on': None, u'comment': None, u'dl': None, u'email': None, u'emph': None, u'emph_ib_or_bi': None, u'emph_ibb': None, u'emph_ibi': None, ...})

    1. 1324 if self.macro is None:
    2. 1325 self.macro = macro.Macro(self)
    3. 1326 return self.formatter.macro(self.macro, macro_name, macro_args, markup=groups.get('macro'))
    4. 1327 _macro_name_repl = _macro_repl
    5. 1328 _macro_args_repl = _macro_repl
    • self = <MoinMoin.parser.text_moin_wiki.Parser instance at 0x170fa28>
    • self.formatter = <MoinMoin.formatter.text_html.Formatter instance at 0x170f560>
    • self.formatter.macro = <bound method Formatter.macro of <MoinMoin.formatter.text_html.Formatter instance at 0x170f560>>
    • self.macro = <MoinMoin.macro.Macro instance at 0x170f320>
    • macro_name = u'SystemInfo'
    • macro_args = None
    • markup undefined
    • groups = {u'big': None, u'big_off': None, u'big_on': None, u'comment': None, u'dl': None, u'email': None, u'emph': None, u'emph_ib_or_bi': None, u'emph_ibb': None, u'emph_ibi': None, ...}
    • groups.get = <built-in method get of dict object at 0x15ac650>
  11. /home/user/workspace/1.8-mercurialbackend-ppacana/MoinMoin/formatter/__init__.py in macro (self=<MoinMoin.formatter.text_html.Formatter instance at 0x170f560>, macro_obj=<MoinMoin.macro.Macro instance at 0x170f320>, name=u'SystemInfo', args=None, markup=u'<<SystemInfo>>')

    1. 312 # call the macro
    2. 313 try:
    3. 314 return macro_obj.execute(name, args)
    4. 315 except ImportError, err:
    5. 316 errmsg = unicode(err)
    • macro_obj = <MoinMoin.macro.Macro instance at 0x170f320>
    • macro_obj.execute = <bound method Macro.execute of <MoinMoin.macro.Macro instance at 0x170f320>>
    • name = u'SystemInfo'
    • args = None
  12. /home/user/workspace/1.8-mercurialbackend-ppacana/MoinMoin/macro/__init__.py in execute (self=<MoinMoin.macro.Macro instance at 0x170f320>, macro_name=u'SystemInfo', args=None)

    1. 126 else:
    2. 127 raise ImportError("Cannot load macro %s" % macro_name)
    3. 128 return execute(self, args)
    4. 129
    5. 130 def _m_lang(self, text):
    • execute = <function <lambda> at 0x16f3398>
    • self = <MoinMoin.macro.Macro instance at 0x170f320>
    • args = None
  13. /home/user/workspace/1.8-mercurialbackend-ppacana/MoinMoin/macro/__init__.py in (_self=<MoinMoin.macro.Macro instance at 0x170f320>, _args=None)

    1. 113 call = wikiutil.importPlugin(self.cfg, 'macro', macro_name,
    2. 114 function='macro_%s' % macro_name)
    3. 115 execute = lambda _self, _args: _self._wrap(call, _args, [self])
    4. 116 except wikiutil.PluginAttributeError:
    5. 117 # fall back to old execute() method, no longer recommended
    • execute undefined
    • _self = <MoinMoin.macro.Macro instance at 0x170f320>
    • _args = None
    • _self._wrap = <bound method Macro._wrap of <MoinMoin.macro.Macro instance at 0x170f320>>
    • call = <function macro_SystemInfo at 0x1721aa0>
    • self = <MoinMoin.macro.Macro instance at 0x170f320>
  14. /home/user/workspace/1.8-mercurialbackend-ppacana/MoinMoin/macro/__init__.py in _wrap (self=<MoinMoin.macro.Macro instance at 0x170f320>, function=<function macro_SystemInfo at 0x1721aa0>, args=None, fixed=[<MoinMoin.macro.Macro instance at 0x170f320>])

    1. 95 try:
    2. 96 return wikiutil.invoke_extension_function(self.request, function,
    3. 97 args, fixed)
    4. 98 except ValueError, e:
    5. 99 return self.format_error(e)
    • args = None
    • fixed = [<MoinMoin.macro.Macro instance at 0x170f320>]
  15. /home/user/workspace/1.8-mercurialbackend-ppacana/MoinMoin/wikiutil.py in invoke_extension_function (request=<MoinMoin.request.request_standalone.Request object at 0x16f1390>, function=<function macro_SystemInfo at 0x1721aa0>, args=None, fixed_args=[<MoinMoin.macro.Macro instance at 0x170f320>])

    1. 2033 kwargs_to_pass.keys()[0]))
    2. 2034
    3. 2035 return function(*fixed_args, **kwargs)
    4. 2036
    5. 2037
    • function = <function macro_SystemInfo at 0x1721aa0>
    • fixed_args = [<MoinMoin.macro.Macro instance at 0x170f320>]
    • kwargs = {}
  16. /home/user/workspace/1.8-mercurialbackend-ppacana/MoinMoin/macro/SystemInfo.py in macro_SystemInfo (macro=<MoinMoin.macro.Macro instance at 0x170f320>)

    1. 171 def macro_SystemInfo(macro):
    2. 172 if macro.request.isSpiderAgent: # reduce bot cpu usage
    3. 173 return ''
    4. 174 return SystemInfo(macro).render()
    5. 175
    • global SystemInfo = <class MoinMoin.macro.SystemInfo.SystemInfo at 0x126db30>
    • macro = <MoinMoin.macro.Macro instance at 0x170f320>
    • ).render undefined
  17. /home/user/workspace/1.8-mercurialbackend-ppacana/MoinMoin/macro/SystemInfo.py in render (self=<MoinMoin.macro.SystemInfo.SystemInfo instance at 0x170fbd8>)

    1. 51 def render(self):
    2. 52 _ = self.request.getText
    3. 53 return self.formatter.rawHTML(self.getInfo())
    4. 54
    5. 55 def getInfo(self):
    • self = <MoinMoin.macro.SystemInfo.SystemInfo instance at 0x170fbd8>
    • self.formatter = <MoinMoin.formatter.text_html.Formatter instance at 0x170f560>
    • self.formatter.rawHTML = <bound method Formatter.rawHTML of <MoinMoin.formatter.text_html.Formatter instance at 0x170f560>>
    • self.getInfo = <bound method SystemInfo.getInfo of <MoinMoin.macro.SystemInfo.SystemInfo instance at 0x170fbd8>>
  18. /home/user/workspace/1.8-mercurialbackend-ppacana/MoinMoin/macro/SystemInfo.py in getInfo (self=<MoinMoin.macro.SystemInfo.SystemInfo instance at 0x170fbd8>)

    1. 94 totalsize += Page(request, page).size()
    2. 95
    3. 96 row(_('Number of pages'), str(len(pagelist)-len(systemPages)))
    4. 97 row(_('Number of system pages'), str(len(systemPages)))
    5. 98
    • row = <function <lambda> at 0x171caa0>
    • _ = <function <lambda> at 0x16f36e0>
    • builtin str = <type 'str'>
    • builtin len = <built-in function len>
    • pagelist = <generator object at 0x170f2d8>
    • systemPages = [u'Pr\xe9sentationTemplate', u'HilfeTemplate', u'HomepageGroupsTemplate', u'HomepageReadPageTemplate', u'HomepageReadWritePageTemplate', u'HomepageTemplate', u'HulpTemplate', u'PagePersonnelleTemplate', u'ProjectGroupsTemplate', u'ProjectTemplate', u'SyncJobTemplate', u'TransparentTemplate', u'AideTemplate', u'Cat\xe9gorieTemplate', u'HelpTemplate', u'HomepagePrivatePageTemplate', u'SlideShowTemplate', u'SlideTemplate', u"SupportPapierD'UnePr\xe9sentationTemplate", u'ThuisbladTemplate', ...]

TypeError

object of type 'generator' has no len()

  • args = ("object of type 'generator' has no len()",)
  • message = "object of type 'generator' has no len()"

System Details

  • Date: Sun, 17 Aug 2008 20:13:52 +0000
  • Platform: Linux linux 2.6.24-19-generic #1 SMP Fri Jul 11 21:01:46 UTC 2008 x86_64
  • Python: Python 2.5.2 (/usr/bin/python)
  • MoinMoin: Release 1.8.0 (alpha)

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2008-08-18 18:44:20, 5.5 KB) [[attachment:FrontPage.html]]
  • [get | view] (2008-08-12 20:50:16, 30.8 KB) [[attachment:traceback2.html]]
  • [get | view] (2008-08-12 21:26:21, 36.6 KB) [[attachment:traceback3.html]]
  • [get | view] (2008-08-12 21:39:51, 21.3 KB) [[attachment:traceback4.html]]
  • [get | view] (2008-08-12 22:09:20, 27.6 KB) [[attachment:traceback5.html]]
  • [get | view] (2008-08-17 20:18:45, 32.1 KB) [[attachment:traceback6.html]]
  • [get | view] (2008-08-17 20:27:15, 7.8 KB) [[attachment:traceback7.html]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.