--> -->

ImportError

cannot import name wiki

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. /var/lib/python-support/python2.5/MoinMoin/request/__init__.py in run (self=<MoinMoin.request.request_cgi.Request object at 0xb7d909ac>)

    1. 1305 self.page.send_page()
    2. 1306 else:
    3. 1307 handler(self.page.page_name, self)
    4. 1308
    5. 1309 # every action that didn't use to raise MoinMoinFinish must call this now:
    • handler = <function do_show at 0x9716b54>
    • self = <MoinMoin.request.request_cgi.Request object at 0xb7d909ac>
    • self.page = <MoinMoin.Page.Page object at 0x973144c>
    • self.page.page_name = u"Quelques_r\xe9flexions_sur_Base-El\xe8ves,_l'\xe9cole_et_la_d\xe9mocratie"
  2. /var/lib/python-support/python2.5/MoinMoin/action/__init__.py in do_show (pagename=u"Quelques_r\xe9flexions_sur_Base-El\xe8ves,_l'\xe9cole_et_la_d\xe9mocratie", request=<MoinMoin.request.request_cgi.Request object at 0xb7d909ac>, content_only=0, count_hit=1, cacheable=1, print_mode=0)

    1. 251 count_hit=count_hit,
    2. 252 print_mode=print_mode,
    3. 253 content_only=content_only,
    4. 254 )
    5. 255
    • content_only = 0
  3. /var/lib/python-support/python2.5/MoinMoin/Page.py in send_page (self=<MoinMoin.Page.Page object at 0x946cc2c>, **keywords={'content_only': 0, 'count_hit': 1, 'print_mode': 0})

    1. 1195 format_args=pi['formatargs'],
    2. 1196 do_cache=do_cache,
    3. 1197 start_line=pi['lines'])
    4. 1198
    5. 1199 # check for pending footnotes
    • start_line undefined
    • pi = {'acl': <MoinMoin.security.AccessControlList instance at 0x946cdec>, 'format': 'wiki', 'formatargs': '', 'language': 'fr', 'lines': 2}
  4. /var/lib/python-support/python2.5/MoinMoin/Page.py in send_page_content (self=<MoinMoin.Page.Page object at 0x946cc2c>, request=<MoinMoin.request.request_cgi.Request object at 0xb7d909ac>, body=u"\n== Quelques r\xe9flexions sur Base\u2013El\xe8ves, l'\xe9cole... \n \n", format='wiki', format_args='', do_cache=1, **kw={'start_line': 2})

    1. 1288 raise
    2. 1289 try:
    3. 1290 code = self.makeCache(request, parser)
    4. 1291 self.execute(request, parser, code)
    5. 1292 except Exception, e:
    • code undefined
    • self = <MoinMoin.Page.Page object at 0x946cc2c>
    • self.makeCache = <bound method Page.makeCache of <MoinMoin.Page.Page object at 0x946cc2c>>
    • request = <MoinMoin.request.request_cgi.Request object at 0xb7d909ac>
    • parser = <MoinMoin.parser.text_moin_wiki.Parser instance at 0x946ccec>
  5. /var/lib/python-support/python2.5/MoinMoin/Page.py in makeCache (self=<MoinMoin.Page.Page object at 0x946cc2c>, request=<MoinMoin.request.request_cgi.Request object at 0xb7d909ac>, parser=<MoinMoin.parser.text_moin_wiki.Parser instance at 0x946ccec>)

    1. 1348 saved_current_lang = request.current_lang
    2. 1349 try:
    3. 1350 text = request.redirectedOutput(parser.format, formatter)
    4. 1351 finally:
    5. 1352 request.current_lang = saved_current_lang
    • text undefined
    • request = <MoinMoin.request.request_cgi.Request object at 0xb7d909ac>
    • request.redirectedOutput = <bound method Request.redirectedOutput of <MoinM...equest.request_cgi.Request object at 0xb7d909ac>>
    • parser = <MoinMoin.parser.text_moin_wiki.Parser instance at 0x946ccec>
    • parser.format = <bound method Parser.format of <MoinMoin.parser.text_moin_wiki.Parser instance at 0x946ccec>>
    • formatter = <MoinMoin.formatter.text_python.Formatter instance at 0x97e5c6c>
  6. /var/lib/python-support/python2.5/MoinMoin/request/__init__.py in redirectedOutput (self=<MoinMoin.request.request_cgi.Request object at 0xb7d909ac>, function=<bound method Parser.format of <MoinMoin.parser.text_moin_wiki.Parser instance at 0x946ccec>>, *args=(<MoinMoin.formatter.text_python.Formatter instance at 0x97e5c6c>,), **kw={})

    1. 842 self.redirect(buf)
    2. 843 try:
    3. 844 function(*args, **kw)
    4. 845 finally:
    5. 846 self.redirect()
    • function = <bound method Parser.format of <MoinMoin.parser.text_moin_wiki.Parser instance at 0x946ccec>>
    • args = (<MoinMoin.formatter.text_python.Formatter instance at 0x97e5c6c>,)
    • kw = {}
  7. /var/lib/python-support/python2.5/MoinMoin/parser/text_moin_wiki.py in format (self=<MoinMoin.parser.text_moin_wiki.Parser instance at 0x946ccec>, formatter=<MoinMoin.formatter.text_python.Formatter instance at 0x97e5c6c>, inhibit_p=False)

    1. 1527
    2. 1528 # Scan line, format and write
    3. 1529 formatted_line = self.scan(line, inhibit_p=inhibit_p)
    4. 1530 self.request.write(formatted_line)
    5. 1531
    • formatted_line = u'<p class="line867"><hr /><p class="line874"> '
    • self = <MoinMoin.parser.text_moin_wiki.Parser instance at 0x946ccec>
    • self.scan = <bound method Parser.scan of <MoinMoin.parser.text_moin_wiki.Parser instance at 0x946ccec>>
    • line = u'<<PageComment2>> '
    • inhibit_p = False
  8. /var/lib/python-support/python2.5/MoinMoin/parser/text_moin_wiki.py in scan (self=<MoinMoin.parser.text_moin_wiki.Parser instance at 0x946ccec>, line=u'<<PageComment2>> ', inhibit_p=False)

    1. 1343 self.in_table or self.in_list):
    2. 1344 result.append(self.formatter.paragraph(1, css_class="line867"))
    3. 1345 result.append(self.replace(match, inhibit_p))
    4. 1346 end = match.end()
    5. 1347 lastpos = end
    • result = ['<p class="line867">']
    • result.append = <built-in method append of list object at 0x97e936c>
    • self = <MoinMoin.parser.text_moin_wiki.Parser instance at 0x946ccec>
    • self.replace = <bound method Parser.replace of <MoinMoin.parser.text_moin_wiki.Parser instance at 0x946ccec>>
    • match = <_sre.SRE_Match object at 0x987a388>
    • inhibit_p = False
  9. /var/lib/python-support/python2.5/MoinMoin/parser/text_moin_wiki.py in replace (self=<MoinMoin.parser.text_moin_wiki.Parser instance at 0x946ccec>, match=<_sre.SRE_Match object at 0x987a388>, inhibit_p=False)

    1. 1385 # Get replace method and replace hit
    2. 1386 replace_func = getattr(self, '_%s_repl' % type)
    3. 1387 result.append(replace_func(hit, match.groupdict()))
    4. 1388 return ''.join(result)
    5. 1389 else:
    • result = []
    • result.append = <built-in method append of list object at 0x97e90ec>
    • replace_func = <bound method Parser._macro_repl of <MoinMoin.parser.text_moin_wiki.Parser instance at 0x946ccec>>
    • hit = u'PageComment2'
    • match = <_sre.SRE_Match object at 0x987a388>
    • match.groupdict = <built-in method groupdict of _sre.SRE_Match object at 0x987a388>
  10. /var/lib/python-support/python2.5/MoinMoin/parser/text_moin_wiki.py in _macro_repl (self=<MoinMoin.parser.text_moin_wiki.Parser instance at 0x946ccec>, word=u'PageComment2', 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. 1310 if self.macro is None:
    2. 1311 self.macro = macro.Macro(self)
    3. 1312 return self.formatter.macro(self.macro, macro_name, macro_args, markup=groups.get('macro'))
    4. 1313 _macro_name_repl = _macro_repl
    5. 1314 _macro_args_repl = _macro_repl
    • self = <MoinMoin.parser.text_moin_wiki.Parser instance at 0x946ccec>
    • self.formatter = <MoinMoin.formatter.text_python.Formatter instance at 0x97e5c6c>
    • self.formatter.macro = <bound method Formatter.macro of <MoinMoin.formatter.text_python.Formatter instance at 0x97e5c6c>>
    • self.macro = <MoinMoin.macro.Macro instance at 0x97e934c>
    • macro_name = u'PageComment2'
    • 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 0x97ec57c>
  11. /var/lib/python-support/python2.5/MoinMoin/formatter/text_python.py in macro (self=<MoinMoin.formatter.text_python.Formatter instance at 0x97e5c6c>, macro_obj=<MoinMoin.macro.Macro instance at 0x97e934c>, name=u'PageComment2', args=None, markup=u'<<PageComment2>>')

    1. 187
    2. 188 def macro(self, macro_obj, name, args, markup=None):
    3. 189 if self.__is_static(macro_obj.get_dependencies(name)):
    4. 190 # XXX: why is this necessary??
    5. 191 macro_obj.formatter = self
    • self = <MoinMoin.formatter.text_python.Formatter instance at 0x97e5c6c>
    • self.__is_static undefined
    • macro_obj = <MoinMoin.macro.Macro instance at 0x97e934c>
    • macro_obj.get_dependencies = <bound method Macro.get_dependencies of <MoinMoin.macro.Macro instance at 0x97e934c>>
    • name = u'PageComment2'
  12. /var/lib/python-support/python2.5/MoinMoin/macro/__init__.py in get_dependencies (self=<MoinMoin.macro.Macro instance at 0x97e934c>, macro_name=u'PageComment2')

    1. 148 try:
    2. 149 return wikiutil.importPlugin(self.request.cfg, 'macro',
    3. 150 macro_name, 'Dependencies')
    4. 151 except wikiutil.PluginError:
    5. 152 return self.defaultDependency
    • macro_name = u'PageComment2'
  13. /var/lib/python-support/python2.5/MoinMoin/wikiutil.py in importPlugin (cfg=<tomate.Config object at 0x96baeec>, kind='macro', name=u'PageComment2', function='Dependencies')

    1. 1105 """
    2. 1106 try:
    3. 1107 return importWikiPlugin(cfg, kind, name, function)
    4. 1108 except PluginMissingError:
    5. 1109 return importBuiltinPlugin(kind, name, function)
    • global importWikiPlugin = <function importWikiPlugin at 0x9563844>
    • cfg = <tomate.Config object at 0x96baeec>
    • kind = 'macro'
    • name = u'PageComment2'
    • function = 'Dependencies'
  14. /var/lib/python-support/python2.5/MoinMoin/wikiutil.py in importWikiPlugin (cfg=<tomate.Config object at 0x96baeec>, kind='macro', name=u'PageComment2', function='Dependencies')

    1. 1118 raise PluginMissingError
    2. 1119 moduleName = '%s.plugin.%s.%s' % (cfg.siteid, kind, name)
    3. 1120 return importNameFromPlugin(moduleName, function)
    4. 1121
    5. 1122
    • global importNameFromPlugin = <function importNameFromPlugin at 0x95638b4>
    • moduleName = u'tomate.plugin.macro.PageComment2'
    • function = 'Dependencies'
  15. /var/lib/python-support/python2.5/MoinMoin/wikiutil.py in importNameFromPlugin (moduleName=u'tomate.plugin.macro.PageComment2', name='Dependencies')

    1. 1142 else:
    2. 1143 fromlist = [name]
    3. 1144 module = __import__(moduleName, globals(), {}, fromlist)
    4. 1145 if fromlist:
    5. 1146 # module has the obj for module <moduleName>
    • module undefined
    • builtin __import__ = <built-in function __import__>
    • moduleName = u'tomate.plugin.macro.PageComment2'
    • builtin globals = <built-in function globals>
    • fromlist = ['Dependencies']
  16. /var/www/tomate.poivron.org/moin/data/plugin/macro/PageComment2.py in ()

    1. 149 from MoinMoin.Page import Page
    2. 150 from MoinMoin.PageEditor import PageEditor
    3. 151 from MoinMoin.parser import wiki
    4. 152
    5. 153
    • MoinMoin undefined
    • wiki undefined

ImportError

cannot import name wiki

  • args = ('cannot import name wiki',)
  • message = 'cannot import name wiki'

System Details

  • Date: Sun, 14 Mar 2010 18:17:59 +0000
  • Platform: Linux web.potager.taz 2.6.26-2-vserver-686 #1 SMP Wed Nov 4 22:32:30 UTC 2009 i686
  • Python: Python 2.5.2 (/usr/bin/python)
  • MoinMoin: Release 1.7.1 (release)