maximum recursion depth exceeded

Roger Haase avatarRoger Haase created an issue

Using Sphinx-1.2b1 to create docs on MoinMoin 2 fails.

To reproduce, clone moin2:

cd ...to moin2 repo
./quickinstall
cd docs
make html

resulting log in tmp:

# Sphinx version: 1.2b1
# Python version: 2.7.3
# Docutils version: 0.10 release
# Jinja2 version: 2.6
Traceback (most recent call last):
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/sphinx/cmdline.py", line 247, in main
    app.build(force_all, filenames)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/sphinx/application.py", line 211, in build
    self.builder.build_update()
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 211, in build_update
    'out of date' % len(to_build))
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 231, in build
    purple, length):
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/sphinx/builders/__init__.py", line 131, in status_iterator
    for item in iterable:
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/sphinx/environment.py", line 458, in update_generator
    self.read_doc(docname, app=app)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/sphinx/environment.py", line 606, in read_doc
    pub.publish()
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/core.py", line 217, in publish
    self.settings)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/readers/__init__.py", line 72, in read
    self.parse()
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/readers/__init__.py", line 78, in parse
    self.parser.parse(self.input, document)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/parsers/rst/__init__.py", line 172, in parse
    self.statemachine.run(inputlines, document, inliner=self.inliner)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 174, in run
    input_source=document['source'])
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/statemachine.py", line 239, in run
    context, state, transitions)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/statemachine.py", line 460, in check_line
    return method(match, context, next_state)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2706, in underline
    self.section(title, source, style, lineno - 1, messages)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 331, in section
    self.new_subsection(title, lineno, messages)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 399, in new_subsection
    node=section_node, match_titles=True)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 286, in nested_parse
    node=node, match_titles=match_titles)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 199, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/statemachine.py", line 239, in run
    context, state, transitions)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/statemachine.py", line 460, in check_line
    return method(match, context, next_state)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2706, in underline
    self.section(title, source, style, lineno - 1, messages)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 331, in section
    self.new_subsection(title, lineno, messages)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 399, in new_subsection
    node=section_node, match_titles=True)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 286, in nested_parse
    node=node, match_titles=match_titles)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 199, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/statemachine.py", line 239, in run
    context, state, transitions)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/statemachine.py", line 460, in check_line
    return method(match, context, next_state)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2279, in explicit_markup
    nodelist, blank_finish = self.explicit_construct(match)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2291, in explicit_construct
    return method(self, expmatch)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2034, in directive
    directive_class, match, type_name, option_presets)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/docutils/parsers/rst/states.py", line 2083, in run_directive
    result = directive_instance.run()
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 1346, in run
    documenter.generate(more_content=self.content)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 755, in generate
    self.document_members(all_members)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 648, in document_members
    for (mname, member, isattr) in self.filter_members(members, want_all):
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 616, in filter_members
    not keep, self.options)
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/sphinx/application.py", line 357, in emit_firstresult
    for result in self.emit(event, *args):
  File "/home/roger/Bitbucket/m2-x1/env/local/lib/python2.7/site-packages/sphinx/application.py", line 349, in emit
    self.debug2('[app] emitting event: %r%s', event, repr(args)[:100])
  File "/home/roger/Bitbucket/m2-x1/MoinMoin/util/tree.py", line 53, in __repr__
    return '<{0}({1!r})>'.format(self.__class__.__name__, self)
  File "/home/roger/Bitbucket/m2-x1/MoinMoin/util/tree.py", line 53, in __repr__
    return '<{0}({1!r})>'.format(self.__class__.__name__, self)
  File "/home/roger/Bitbucket/m2-x1/MoinMoin/util/tree.py", line 53, in __repr__
    return '<{0}({1!r})>'.format(self.__class__.__name__, self)
  File "/home/roger/Bitbucket/m2-x1/MoinMoin/util/tree.py", line 53, in __repr__
    return '<{0}({1!r})>'.format(self.__class__.__name__, self)
  File "/home/roger/Bitbucket/m2-x1/MoinMoin/util/tree.py", line 53, in __repr__
    return '<{0}({1!r})>'.format(self.__class__.__name__, self)
  File "/home/roger/Bitbucket/m2-x1/MoinMoin/util/tree.py", line 53, in __repr__
    return '<{0}({1!r})>'.format(self.__class__.__name__, self)
  File "/home/roger/Bitbucket/m2-x1/MoinMoin/util/tree.py", line 53, in __repr__
    return '<{0}({1!r})>'.format(self.__class__.__name__, self)

**** snip ****

  File "/home/roger/Bitbucket/m2-x1/MoinMoin/util/tree.py", line 53, in __repr__
    return '<{0}({1!r})>'.format(self.__class__.__name__, self)
  File "/home/roger/Bitbucket/m2-x1/MoinMoin/util/tree.py", line 53, in __repr__
    return '<{0}({1!r})>'.format(self.__class__.__name__, self)
  File "/home/roger/Bitbucket/m2-x1/MoinMoin/util/tree.py", line 53, in __repr__
    return '<{0}({1!r})>'.format(self.__class__.__name__, self)
  File "/home/roger/Bitbucket/m2-x1/MoinMoin/util/tree.py", line 53, in __repr__
    return '<{0}({1!r})>'.format(self.__class__.__name__, self)
  File "/home/roger/Bitbucket/m2-x1/MoinMoin/util/tree.py", line 53, in __repr__
    return '<{0}({1!r})>'.format(self.__class__.__name__, self)
  File "/home/roger/Bitbucket/m2-x1/MoinMoin/util/tree.py", line 53, in __repr__
    return '<{0}({1!r})>'.format(self.__class__.__name__, self)
RuntimeError: maximum recursion depth exceeded while calling a Python object

Comments (1)

  1. Georg Brandl

    That is a bug in the __repr__ method of some class in MoinMoin.util.tree: it formats the repr "self", which of course calls __repr__ again.

    Sphinx 1.2 uncovers this because the debug() call is new.

  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.