--> -->

TypeError

safe_import() got an unexpected keyword argument 'level'

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/davimas/moinmoin/davimas.name/MoinMoin/request/__init__.py in run (self=<MoinMoin.request.request_cgi.Request object>)

    1. 1309 self.page.send_page()
    2. 1310 else:
    3. 1311 handler(self.page.page_name, self)
    4. 1312
    5. 1313 # every action that didn't use to raise MoinMoinFinish must call this now:
    • handler = <function do_show>
    • self = <MoinMoin.request.request_cgi.Request object>
    • self.page = <MoinMoin.Page.Page object>
    • self.page.page_name = u'HelpOnParsers/ReStructuredText/RstPrimer'
  2. /home/davimas/moinmoin/davimas.name/MoinMoin/action/__init__.py in do_show (pagename=u'HelpOnParsers/ReStructuredText/RstPrimer', request=<MoinMoin.request.request_cgi.Request object>, 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. /home/davimas/moinmoin/davimas.name/MoinMoin/Page.py in send_page (self=<MoinMoin.Page.Page object>, **keywords={'content_only': 0, 'count_hit': 1, 'print_mode': 0})

    1. 1198 format_args=pi['formatargs'],
    2. 1199 do_cache=do_cache,
    3. 1200 start_line=pi['lines'])
    4. 1201
    5. 1202 # check for pending footnotes
    • start_line undefined
    • pi = {'acl': <MoinMoin.security.AccessControlList instance>, 'format': u'wiki', 'formatargs': u'', 'language': u'en', 'lines': 7}
  4. /home/davimas/moinmoin/davimas.name/MoinMoin/Page.py in send_page_content (self=<MoinMoin.Page.Page object>, request=<MoinMoin.request.request_cgi.Request object>, body=u'{{{#!rst\n\nA ReStructuredText Primer\n============...t web site: http://docutils.sourceforge.net/\n}}}\n', format=u'wiki', format_args=u'', do_cache=1, **kw={'start_line': 7})

    1. 1297 raise
    2. 1298 try:
    3. 1299 code = self.makeCache(request, parser)
    4. 1300 self.execute(request, parser, code)
    5. 1301 except Exception, e:
    • code = <code object <module> at 0x30aed267db0, file "HelpOnParsers/ReStructuredText/RstPrimer", line 2>
    • self = <MoinMoin.Page.Page object>
    • self.makeCache = <bound method Page.makeCache of <MoinMoin.Page.Page object>>
    • request = <MoinMoin.request.request_cgi.Request object>
    • parser = <MoinMoin.parser.text_moin_wiki.Parser instance>
  5. /home/davimas/moinmoin/davimas.name/MoinMoin/Page.py in makeCache (self=<MoinMoin.Page.Page object>, request=<MoinMoin.request.request_cgi.Request object>, parser=<MoinMoin.parser.text_moin_wiki.Parser instance>)

    1. 1357 saved_current_lang = request.current_lang
    2. 1358 try:
    3. 1359 text = request.redirectedOutput(parser.format, formatter)
    4. 1360 finally:
    5. 1361 request.current_lang = saved_current_lang
    • text undefined
    • request = <MoinMoin.request.request_cgi.Request object>
    • request.redirectedOutput = <bound method Request.redirectedOutput of <MoinMoin.request.request_cgi.Request object>>
    • parser = <MoinMoin.parser.text_moin_wiki.Parser instance>
    • parser.format = <bound method Parser.format of <MoinMoin.parser.text_moin_wiki.Parser instance>>
    • formatter = <MoinMoin.formatter.text_python.Formatter instance>
  6. /home/davimas/moinmoin/davimas.name/MoinMoin/request/__init__.py in redirectedOutput (self=<MoinMoin.request.request_cgi.Request object>, function=<bound method Parser.format of <MoinMoin.parser.text_moin_wiki.Parser instance>>, *args=(<MoinMoin.formatter.text_python.Formatter instance>,), **kw={})

    1. 846 self.redirect(buf)
    2. 847 try:
    3. 848 function(*args, **kw)
    4. 849 finally:
    5. 850 self.redirect()
    • function = <bound method Parser.format of <MoinMoin.parser.text_moin_wiki.Parser instance>>
    • args = (<MoinMoin.formatter.text_python.Formatter instance>,)
    • kw = {}
  7. /home/davimas/moinmoin/davimas.name/MoinMoin/parser/text_moin_wiki.py in format (self=<MoinMoin.parser.text_moin_wiki.Parser instance>, formatter=<MoinMoin.formatter.text_python.Formatter instance>, inhibit_p=False)

    1. 1545
    2. 1546 # Scan line, format and write
    3. 1547 formatted_line = self.scan(line, inhibit_p=inhibit_p)
    4. 1548 self.request.write(formatted_line)
    5. 1549
    • formatted_line = u''
    • self = <MoinMoin.parser.text_moin_wiki.Parser instance>
    • self.scan = <bound method Parser.scan of <MoinMoin.parser.text_moin_wiki.Parser instance>>
    • line = u'}}}'
    • inhibit_p = False
  8. /home/davimas/moinmoin/davimas.name/MoinMoin/parser/text_moin_wiki.py in scan (self=<MoinMoin.parser.text_moin_wiki.Parser instance>, line=u'}}}', inhibit_p=False)

    1. 1359 self.in_table or self.in_list):
    2. 1360 result.append(self.formatter.paragraph(1, css_class="line867"))
    3. 1361 result.append(self.replace(match, inhibit_p))
    4. 1362 end = match.end()
    5. 1363 lastpos = end
    • result = []
    • result.append = <built-in method append of list object>
    • self = <MoinMoin.parser.text_moin_wiki.Parser instance>
    • self.replace = <bound method Parser.replace of <MoinMoin.parser.text_moin_wiki.Parser instance>>
    • match = <_sre.SRE_Match object>
    • inhibit_p = False
  9. /home/davimas/moinmoin/davimas.name/MoinMoin/parser/text_moin_wiki.py in replace (self=<MoinMoin.parser.text_moin_wiki.Parser instance>, match=<_sre.SRE_Match object>, inhibit_p=False)

    1. 1403 # Get replace method and replace hit
    2. 1404 replace_func = getattr(self, '_%s_repl' % type)
    3. 1405 result.append(replace_func(hit, match.groupdict()))
    4. 1406 return ''.join(result)
    5. 1407 else:
    • result = []
    • result.append = <built-in method append of list object>
    • replace_func = <bound method Parser._parser_end_repl of <MoinMoin.parser.text_moin_wiki.Parser instance>>
    • hit = u'}}}'
    • match = <_sre.SRE_Match object>
    • match.groupdict = <built-in method groupdict of _sre.SRE_Match object>
  10. /home/davimas/moinmoin/davimas.name/MoinMoin/parser/text_moin_wiki.py in _parser_end_repl (self=<MoinMoin.parser.text_moin_wiki.Parser instance>, word=u'}}}', groups={u'parser_end': u'}}}'})

    1. 1294 # we obviously did not find a parser specification
    2. 1295 self.parser_name = 'text'
    3. 1296 result = self.formatter.parser(self.parser_name, self.parser_lines)
    4. 1297 del self.parser_lines
    5. 1298 self.in_pre = None
    • result undefined
    • self = <MoinMoin.parser.text_moin_wiki.Parser instance>
    • self.formatter = <MoinMoin.formatter.text_python.Formatter instance>
    • self.formatter.parser = <bound method Formatter.parser of <MoinMoin.formatter.text_python.Formatter instance>>
    • self.parser_name = u'rst'
    • self.parser_lines = [u'#!rst ', u'', u'A ReStructuredText Primer', u'=========================', u'', u':Author: Richard Jones', u':Version: $Revision: 1.17 $', u':Copyright: This document has been placed in the public domain.', u'', u'.. contents::', u'', u'', u'The text below contains links that look like "(quickref__)". These', u'are relative links that point to the `Quick reStructuredText`_ user', u"reference. If these links don't work, please refer to the `master", u'quick reference`_ document.', u'', u'__', u'.. _Quick reStructuredText: quickref.html', u'.. _master quick reference:', ...]
  11. /home/davimas/moinmoin/davimas.name/MoinMoin/formatter/text_python.py in parser (self=<MoinMoin.formatter.text_python.Formatter instance>, parser_name=u'rst', lines=[u'#!rst ', u'', u'A ReStructuredText Primer', u'=========================', u'', u':Author: Richard Jones', u':Version: $Revision: 1.17 $', u':Copyright: This document has been placed in the public domain.', u'', u'.. contents::', u'', u'', u'The text below contains links that look like "(quickref__)". These', u'are relative links that point to the `Quick reStructuredText`_ user', u"reference. If these links don't work, please refer to the `master", u'quick reference`_ document.', u'', u'__', u'.. _Quick reStructuredText: quickref.html', u'.. _master quick reference:', ...])

    1. 207
    2. 208 if self.__is_static(Dependencies):
    3. 209 return self.formatter.parser(parser_name, lines)
    4. 210 else:
    5. 211 return self.__insert_code('%s%s.parser(%r, %r)' %
    • self = <MoinMoin.formatter.text_python.Formatter instance>
    • self.formatter = <MoinMoin.formatter.text_html.Formatter instance>
    • self.formatter.parser = <bound method Formatter.parser of <MoinMoin.formatter.text_html.Formatter instance>>
    • parser_name = u'rst'
    • lines = [u'#!rst ', u'', u'A ReStructuredText Primer', u'=========================', u'', u':Author: Richard Jones', u':Version: $Revision: 1.17 $', u':Copyright: This document has been placed in the public domain.', u'', u'.. contents::', u'', u'', u'The text below contains links that look like "(quickref__)". These', u'are relative links that point to the `Quick reStructuredText`_ user', u"reference. If these links don't work, please refer to the `master", u'quick reference`_ document.', u'', u'__', u'.. _Quick reStructuredText: quickref.html', u'.. _master quick reference:', ...]
  12. /home/davimas/moinmoin/davimas.name/MoinMoin/formatter/__init__.py in parser (self=<MoinMoin.formatter.text_html.Formatter instance>, parser_name=u'rst', lines=[u'A ReStructuredText Primer', u'=========================', u'', u':Author: Richard Jones', u':Version: $Revision: 1.17 $', u':Copyright: This document has been placed in the public domain.', u'', u'.. contents::', u'', u'', u'The text below contains links that look like "(quickref__)". These', u'are relative links that point to the `Quick reStructuredText`_ user', u"reference. If these links don't work, please refer to the `master", u'quick reference`_ document.', u'', u'__', u'.. _Quick reStructuredText: quickref.html', u'.. _master quick reference:', u' http://docutils.sourceforge.net/docs/user/rst/quickref.html', u'', ...])

    1. 346 lines = lines[:-1]
    2. 347 p = parser('\n'.join(lines), self.request, format_args=args)
    3. 348 p.format(self)
    4. 349 del p
    5. 350 return ''
    • p = <MoinMoin.parser.text_rst.Parser instance>
    • p.format = <bound method Parser.format of <MoinMoin.parser.text_rst.Parser instance>>
    • self = <MoinMoin.formatter.text_html.Formatter instance>
  13. /home/davimas/moinmoin/davimas.name/MoinMoin/parser/text_rst.py in format (self=<MoinMoin.parser.text_rst.Parser instance>, formatter=<MoinMoin.formatter.text_html.Formatter instance>)

    1. 213 'raw_enabled': 0,
    2. 214 'stylesheet_path': '',
    3. 215 'template': '',
    4. 216 }
    5. 217 )
  14. /usr/lib/python2.7/dist-packages/docutils/core.py in publish_parts (source=u'A ReStructuredText Primer\n======================...roject web site: http://docutils.sourceforge.net/', source_path=None, source_class=<class docutils.io.StringInput>, destination_path=None, reader=None, reader_name='standalone', parser=None, parser_name='restructuredtext', writer=<MoinMoin.parser.text_rst.MoinWriter instance>, writer_name='pseudoxml', settings=None, settings_spec=None, settings_overrides={'file_insertion_enabled': 0, 'halt_level': 5, 'raw_enabled': 0, 'stylesheet_path': '', 'template': '', 'traceback': True}, config_section=None, enable_exit_status=False)

    1. 446 settings_overrides=settings_overrides,
    2. 447 config_section=config_section,
    3. 448 enable_exit_status=enable_exit_status)
    4. 449 return pub.writer.parts
    5. 450
    • enable_exit_status = False
  15. /usr/lib/python2.7/dist-packages/docutils/core.py in publish_programmatically (source_class=<class docutils.io.StringInput>, source=u'A ReStructuredText Primer\n======================...roject web site: http://docutils.sourceforge.net/', source_path=None, destination_class=<class docutils.io.StringOutput>, destination=None, destination_path=None, reader=None, reader_name='standalone', parser=None, parser_name='restructuredtext', writer=<MoinMoin.parser.text_rst.MoinWriter instance>, writer_name='pseudoxml', settings=None, settings_spec=None, settings_overrides={'file_insertion_enabled': 0, 'halt_level': 5, 'raw_enabled': 0, 'stylesheet_path': '', 'template': '', 'traceback': True}, config_section=None, enable_exit_status=False)

    1. 655 source_class=source_class,
    2. 656 destination_class=destination_class)
    3. 657 pub.set_components(reader_name, parser_name, writer_name)
    4. 658 pub.process_programmatic_settings(
    5. 659 settings_spec, settings_overrides, config_section)
    • pub = <docutils.core.Publisher instance>
    • pub.set_components = <bound method Publisher.set_components of <docutils.core.Publisher instance>>
    • reader_name = 'standalone'
    • parser_name = 'restructuredtext'
    • writer_name = 'pseudoxml'
  16. /usr/lib/python2.7/dist-packages/docutils/core.py in set_components (self=<docutils.core.Publisher instance>, reader_name='standalone', parser_name='restructuredtext', writer_name='pseudoxml')

    1. 91 def set_components(self, reader_name, parser_name, writer_name):
    2. 92 if self.reader is None:
    3. 93 self.set_reader(reader_name, self.parser, parser_name)
    4. 94 if self.parser is None:
    5. 95 if self.reader.parser is None:
    • self = <docutils.core.Publisher instance>
    • self.set_reader = <bound method Publisher.set_reader of <docutils.core.Publisher instance>>
    • reader_name = 'standalone'
    • self.parser = None
    • parser_name = 'restructuredtext'
  17. /usr/lib/python2.7/dist-packages/docutils/core.py in set_reader (self=<docutils.core.Publisher instance>, reader_name='standalone', parser=None, parser_name='restructuredtext')

    1. 80 def set_reader(self, reader_name, parser, parser_name):
    2. 81 """Set `self.reader` by name."""
    3. 82 reader_class = readers.get_reader_class(reader_name)
    4. 83 self.reader = reader_class(parser, parser_name)
    5. 84 self.parser = self.reader.parser
    • reader_class undefined
    • global readers = <module 'docutils.readers' from '/usr/lib/python2.7/dist-packages/docutils/readers/__init__.pyc'>
    • readers.get_reader_class = <function get_reader_class>
    • reader_name = 'standalone'
  18. /usr/lib/python2.7/dist-packages/docutils/readers/__init__.py in get_reader_class (reader_name='standalone')

    1. 108 reader_name = _reader_aliases[reader_name]
    2. 109 try:
    3. 110 module = __import__(reader_name, globals(), locals(), level=1)
    4. 111 except ImportError:
    5. 112 module = __import__(reader_name, globals(), locals(), level=0)
    • module undefined
    • global __import__ = <function safe_import>
    • reader_name = 'standalone'
    • builtin globals = <built-in function globals>
    • builtin locals = <built-in function locals>
    • level undefined

TypeError

safe_import() got an unexpected keyword argument 'level'

  • args = ("safe_import() got an unexpected keyword argument 'level'",)
  • message = "safe_import() got an unexpected keyword argument 'level'"

System Details

  • Date: Sat, 24 Feb 2018 04:29:28 +0000
  • Platform: Linux butts 3.2.61-grsec-modsign #1 SMP Tue Aug 12 09:58:26 UTC 2014 x86_64
  • Python: Python 2.7.6 (/usr/bin/python)
  • MoinMoin: Release 1.8.9 (release)