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.
/home/user/workspace/1.8-storage-cdenter/MoinMoin/request/__init__.py in run (self=<MoinMoin.request.request_standalone.Request object at 0xcc4b10>)
- 1302 self.page.send_page()
- 1303 else:
- 1304 handler(self.page.page_name, self)
- 1305
- 1306 # every action that didn't use to raise MoinMoinFinish must call this now:
- handler = <function do_show at 0xe645f0>
- self = <MoinMoin.request.request_standalone.Request object at 0xcc4b10>
- self.page = <MoinMoin.Page.Page object at 0xe66290>
- self.page.page_name = u'SystemInfo'
/home/user/workspace/1.8-storage-cdenter/MoinMoin/action/__init__.py in do_show (pagename=u'SystemInfo', request=<MoinMoin.request.request_standalone.Request object at 0xcc4b10>, content_only=0, count_hit=1, cacheable=1, print_mode=0)
- 284 count_hit=count_hit,
- 285 print_mode=print_mode,
- 286 content_only=content_only,
- 287 )
- 288
- content_only = 0
/home/user/workspace/1.8-storage-cdenter/MoinMoin/Page.py in send_page (self=<MoinMoin.Page.Page object at 0xe80550>, **keywords={'content_only': 0, 'count_hit': 1, 'print_mode': 0})
- 986 format_args=pi['formatargs'],
- 987 do_cache=do_cache,
- 988 start_line=pi['lines'])
- 989
- 990 # check for pending footnotes
- start_line undefined
- pi = {'format': 'wiki', 'formatargs': '', 'language': 'en', 'lines': 10}
/home/user/workspace/1.8-storage-cdenter/MoinMoin/Page.py in send_page_content (self=<MoinMoin.Page.Page object at 0xe80550>, request=<MoinMoin.request.request_standalone.Request object at 0xcc4b10>, body=u'<<SystemInfo>>\n', format='wiki', format_args='', do_cache=1, **kw={'start_line': 10})
- 1069
- 1070 if not (do_cache and self.canUseCache(Parser)):
- 1071 self.format(parser)
- 1072 else:
- 1073 try:
- self = <MoinMoin.Page.Page object at 0xe80550>
- self.format = <bound method Page.format of <MoinMoin.Page.Page object at 0xe80550>>
- parser = <MoinMoin.parser.text_moin_wiki.Parser instance at 0xe6db48>
/home/user/workspace/1.8-storage-cdenter/MoinMoin/Page.py in format (self=<MoinMoin.Page.Page object at 0xe80550>, parser=<MoinMoin.parser.text_moin_wiki.Parser instance at 0xe6db48>)
- 1090 def format(self, parser):
- 1091 """ Format and write page content without caching """
- 1092 parser.format(self.formatter)
- 1093
- 1094 def execute(self, request, parser, code):
- parser = <MoinMoin.parser.text_moin_wiki.Parser instance at 0xe6db48>
- parser.format = <bound method Parser.format of <MoinMoin.parser.text_moin_wiki.Parser instance at 0xe6db48>>
- self = <MoinMoin.Page.Page object at 0xe80550>
- self.formatter = <MoinMoin.formatter.text_html.Formatter instance at 0xe6db90>
/home/user/workspace/1.8-storage-cdenter/MoinMoin/parser/text_moin_wiki.py in format (self=<MoinMoin.parser.text_moin_wiki.Parser instance at 0xe6db48>, formatter=<MoinMoin.formatter.text_html.Formatter instance at 0xe6db90>, inhibit_p=False)
- 1541
- 1542 # Scan line, format and write
- 1543 formatted_line = self.scan(line, inhibit_p=inhibit_p)
- 1544 self.request.write(formatted_line)
- 1545
- formatted_line undefined
- self = <MoinMoin.parser.text_moin_wiki.Parser instance at 0xe6db48>
- self.scan = <bound method Parser.scan of <MoinMoin.parser.text_moin_wiki.Parser instance at 0xe6db48>>
- line = u'<<SystemInfo>> '
- inhibit_p = False
/home/user/workspace/1.8-storage-cdenter/MoinMoin/parser/text_moin_wiki.py in scan (self=<MoinMoin.parser.text_moin_wiki.Parser instance at 0xe6db48>, line=u'<<SystemInfo>> ', inhibit_p=False)
- 1357 self.in_table or self.in_list):
- 1358 result.append(self.formatter.paragraph(1, css_class="line867"))
- 1359 result.append(self.replace(match, inhibit_p))
- 1360 end = match.end()
- 1361 lastpos = end
- result = ['<p class="line867">']
- result.append = <built-in method append of list object at 0x100f3b0>
- self = <MoinMoin.parser.text_moin_wiki.Parser instance at 0xe6db48>
- self.replace = <bound method Parser.replace of <MoinMoin.parser.text_moin_wiki.Parser instance at 0xe6db48>>
- match = <_sre.SRE_Match object at 0xf04fc0>
- inhibit_p = False
/home/user/workspace/1.8-storage-cdenter/MoinMoin/parser/text_moin_wiki.py in replace (self=<MoinMoin.parser.text_moin_wiki.Parser instance at 0xe6db48>, match=<_sre.SRE_Match object at 0xf04fc0>, inhibit_p=False)
- 1399 # Get replace method and replace hit
- 1400 replace_func = getattr(self, '_%s_repl' % type)
- 1401 result.append(replace_func(hit, match.groupdict()))
- 1402 return ''.join(result)
- 1403 else:
- result = []
- result.append = <built-in method append of list object at 0xde35f0>
- replace_func = <bound method Parser._macro_repl of <MoinMoin.parser.text_moin_wiki.Parser instance at 0xe6db48>>
- hit = u'SystemInfo'
- match = <_sre.SRE_Match object at 0xf04fc0>
- match.groupdict = <built-in method groupdict of _sre.SRE_Match object at 0xf04fc0>
/home/user/workspace/1.8-storage-cdenter/MoinMoin/parser/text_moin_wiki.py in _macro_repl (self=<MoinMoin.parser.text_moin_wiki.Parser instance at 0xe6db48>, 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, ...})
- 1324 if self.macro is None:
- 1325 self.macro = macro.Macro(self)
- 1326 return self.formatter.macro(self.macro, macro_name, macro_args, markup=groups.get('macro'))
- 1327 _macro_name_repl = _macro_repl
- 1328 _macro_args_repl = _macro_repl
- self = <MoinMoin.parser.text_moin_wiki.Parser instance at 0xe6db48>
- self.formatter = <MoinMoin.formatter.text_html.Formatter instance at 0xe6db90>
- self.formatter.macro = <bound method Formatter.macro of <MoinMoin.formatter.text_html.Formatter instance at 0xe6db90>>
- self.macro = <MoinMoin.macro.Macro instance at 0xec2c20>
- 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 0x104da50>
/home/user/workspace/1.8-storage-cdenter/MoinMoin/formatter/__init__.py in macro (self=<MoinMoin.formatter.text_html.Formatter instance at 0xe6db90>, macro_obj=<MoinMoin.macro.Macro instance at 0xec2c20>, name=u'SystemInfo', args=None, markup=u'<<SystemInfo>>')
- 312 # call the macro
- 313 try:
- 314 return macro_obj.execute(name, args)
- 315 except ImportError, err:
- 316 errmsg = unicode(err)
- macro_obj = <MoinMoin.macro.Macro instance at 0xec2c20>
- macro_obj.execute = <bound method Macro.execute of <MoinMoin.macro.Macro instance at 0xec2c20>>
- name = u'SystemInfo'
- args = None
/home/user/workspace/1.8-storage-cdenter/MoinMoin/macro/__init__.py in execute (self=<MoinMoin.macro.Macro instance at 0xec2c20>, macro_name=u'SystemInfo', args=None)
- 126 else:
- 127 raise ImportError("Cannot load macro %s" % macro_name)
- 128 return execute(self, args)
- 129
- 130 def _m_lang(self, text):
- execute = <function <lambda> at 0xa3a230>
- self = <MoinMoin.macro.Macro instance at 0xec2c20>
- args = None
/home/user/workspace/1.8-storage-cdenter/MoinMoin/macro/__init__.py in
(_self=<MoinMoin.macro.Macro instance at 0xec2c20>, _args=None) - 113 call = wikiutil.importPlugin(self.cfg, 'macro', macro_name,
- 114 function='macro_%s' % macro_name)
- 115 execute = lambda _self, _args: _self._wrap(call, _args, [self])
- 116 except wikiutil.PluginAttributeError:
- 117 # fall back to old execute() method, no longer recommended
- execute undefined
- _self = <MoinMoin.macro.Macro instance at 0xec2c20>
- _args = None
- _self._wrap = <bound method Macro._wrap of <MoinMoin.macro.Macro instance at 0xec2c20>>
- call = <function macro_SystemInfo at 0xa3ab90>
- self = <MoinMoin.macro.Macro instance at 0xec2c20>
/home/user/workspace/1.8-storage-cdenter/MoinMoin/macro/__init__.py in _wrap (self=<MoinMoin.macro.Macro instance at 0xec2c20>, function=<function macro_SystemInfo at 0xa3ab90>, args=None, fixed=[<MoinMoin.macro.Macro instance at 0xec2c20>])
- 95 try:
- 96 return wikiutil.invoke_extension_function(self.request, function,
- 97 args, fixed)
- 98 except ValueError, e:
- 99 return self.format_error(e)
- args = None
- fixed = [<MoinMoin.macro.Macro instance at 0xec2c20>]
/home/user/workspace/1.8-storage-cdenter/MoinMoin/wikiutil.py in invoke_extension_function (request=<MoinMoin.request.request_standalone.Request object at 0xcc4b10>, function=<function macro_SystemInfo at 0xa3ab90>, args=None, fixed_args=[<MoinMoin.macro.Macro instance at 0xec2c20>])
- 2033 kwargs_to_pass.keys()[0]))
- 2034
- 2035 return function(*fixed_args, **kwargs)
- 2036
- 2037
- function = <function macro_SystemInfo at 0xa3ab90>
- fixed_args = [<MoinMoin.macro.Macro instance at 0xec2c20>]
- kwargs = {}
/home/user/workspace/1.8-storage-cdenter/MoinMoin/macro/SystemInfo.py in macro_SystemInfo (macro=<MoinMoin.macro.Macro instance at 0xec2c20>)
- 171 def macro_SystemInfo(macro):
- 172 if macro.request.isSpiderAgent: # reduce bot cpu usage
- 173 return ''
- 174 return SystemInfo(macro).render()
- 175
- global SystemInfo = <class MoinMoin.macro.SystemInfo.SystemInfo at 0xa3b230>
- macro = <MoinMoin.macro.Macro instance at 0xec2c20>
- ).render undefined
/home/user/workspace/1.8-storage-cdenter/MoinMoin/macro/SystemInfo.py in render (self=<MoinMoin.macro.SystemInfo.SystemInfo instance at 0xec2fc8>)
- 51 def render(self):
- 52 _ = self.request.getText
- 53 return self.formatter.rawHTML(self.getInfo())
- 54
- 55 def getInfo(self):
- self = <MoinMoin.macro.SystemInfo.SystemInfo instance at 0xec2fc8>
- self.formatter = <MoinMoin.formatter.text_html.Formatter instance at 0xe6db90>
- self.formatter.rawHTML = <bound method Formatter.rawHTML of <MoinMoin.formatter.text_html.Formatter instance at 0xe6db90>>
- self.getInfo = <bound method SystemInfo.getInfo of <MoinMoin.macro.SystemInfo.SystemInfo instance at 0xec2fc8>>
/home/user/workspace/1.8-storage-cdenter/MoinMoin/macro/SystemInfo.py in getInfo (self=<MoinMoin.macro.SystemInfo.SystemInfo instance at 0xec2fc8>)
- 94 totalsize += Page(request, page).size()
- 95
- 96 row(_('Number of pages'), str(len(pagelist)-len(systemPages)))
- 97 row(_('Number of system pages'), str(len(systemPages)))
- 98
- row = <function <lambda> at 0xa3e398>
- _ = <function <lambda> at 0xd477d0>
- builtin str = <type 'str'>
- builtin len = <built-in function len>
- pagelist = <generator object at 0xeebf38>
- systemPages = [u'Pr\xe9sentationTemplate', u'HilfeTemplate', u'HomepageReadPageTemplate', u'ProjectGroupsTemplate', u'ProjectTemplate', u'AideTemplate', u'HomepageGroupsTemplate', u'HomepageReadWritePageTemplate', u'HomepageTemplate', u'HulpTemplate', u'PagePersonnelleTemplate', u"SupportPapierD'UnePr\xe9sentationTemplate", u'SyncJobTemplate', u'TransparentTemplate', u'Cat\xe9gorieTemplate', u'HelpTemplate', u'HomepagePrivatePageTemplate', u'SlideShowTemplate', u'SlideTemplate', 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 21:52: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)