Issues

Issue #814 resolved

'function' object has no attribute '__bases__'

Anonymous created an issue
# Sphinx version: 1.1.2
# Python version: 2.7.2+
# Docutils version: 0.8.1 release
# Jinja2 version: 2.6
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.2-py2.7.egg/sphinx/cmdline.py", line 189, in main
    app.build(force_all, filenames)
  File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.2-py2.7.egg/sphinx/application.py", line 204, in build
    self.builder.build_update()
  File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.2-py2.7.egg/sphinx/builders/__init__.py", line 196, in build_update
    'out of date' % len(to_build))
  File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.2-py2.7.egg/sphinx/builders/__init__.py", line 216, in build
    purple, length):
  File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.2-py2.7.egg/sphinx/builders/__init__.py", line 120, in status_iterator
    for item in iterable:
  File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.2-py2.7.egg/sphinx/environment.py", line 613, in update_generator
    self.read_doc(docname, app=app)
  File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.2-py2.7.egg/sphinx/environment.py", line 761, in read_doc
    pub.publish()
  File "/usr/lib/pymodules/python2.7/docutils/core.py", line 211, in publish
    self.settings)
  File "/usr/lib/pymodules/python2.7/docutils/readers/__init__.py", line 69, in read
    self.parse()
  File "/usr/lib/pymodules/python2.7/docutils/readers/__init__.py", line 75, in parse
    self.parser.parse(self.input, document)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/__init__.py", line 157, in parse
    self.statemachine.run(inputlines, document, inliner=self.inliner)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 170, in run
    input_source=document['source'])
  File "/usr/lib/pymodules/python2.7/docutils/statemachine.py", line 237, in run
    context, state, transitions)
  File "/usr/lib/pymodules/python2.7/docutils/statemachine.py", line 458, in check_line
    return method(match, context, next_state)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 2709, in underline
    self.section(title, source, style, lineno - 1, messages)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 329, in section
    self.new_subsection(title, lineno, messages)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 398, in new_subsection
    node=section_node, match_titles=1)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 284, in nested_parse
    node=node, match_titles=match_titles)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 195, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "/usr/lib/pymodules/python2.7/docutils/statemachine.py", line 237, in run
    context, state, transitions)
  File "/usr/lib/pymodules/python2.7/docutils/statemachine.py", line 458, in check_line
    return method(match, context, next_state)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 2285, in explicit_markup
    self.explicit_list(blank_finish)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 2316, in explicit_list
    match_titles=self.state_machine.match_titles)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 321, in nested_list_parse
    node=node, match_titles=match_titles)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 195, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "/usr/lib/pymodules/python2.7/docutils/statemachine.py", line 237, in run
    context, state, transitions)
  File "/usr/lib/pymodules/python2.7/docutils/statemachine.py", line 458, in check_line
    return method(match, context, next_state)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 2589, in explicit_markup
    nodelist, blank_finish = self.explicit_construct(match)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 2295, in explicit_construct
    return method(self, expmatch)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 2036, in directive
    directive_class, match, type_name, option_presets)
  File "/usr/lib/pymodules/python2.7/docutils/parsers/rst/states.py", line 2087, in run_directive
    result = directive_instance.run()
  File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.2-py2.7.egg/sphinx/ext/autodoc.py", line 1299, in run
    documenter.generate(more_content=self.content)
  File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.2-py2.7.egg/sphinx/ext/autodoc.py", line 720, in generate
    self.add_directive_header(sig)
  File "/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.2-py2.7.egg/sphinx/ext/autodoc.py", line 997, in add_directive_header
    if len(self.object.__bases__):
AttributeError: 'function' object has no attribute '__bases__'

Comments (4)

  1. Christoph Deil

    I see a similar error:

    AttributeError: 'function' object has no attribute '__bases__'
    

    using

    # Sphinx version: 1.1.3
    # Python version: 2.7.3
    # Docutils version: 0.9.1 release
    # Jinja2 version: 2.6
    

    Full output is here

  2. Log in to comment