You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@thmoreported this crash when building the pytest docs (apparently they use sphinxcontrib-trio now, I had no idea :-)):
# Sphinx version: 1.7.5
# Python version: 3.6.6 (CPython)
# Docutils version: 0.14
# Jinja2 version: 2.10
# Last messages:
# reading sources... [ 89%] projects
#
# reading sources... [ 90%] proposals/parametrize_with_fixtures
#
# reading sources... [ 91%] pythonpath
#
# reading sources... [ 92%] recwarn
#
# reading sources... [ 92%] reference
#
# Loaded extensions:
# alabaster (0.7.9) from /usr/lib/python3.6/site-packages/alabaster/__init__.py
# sphinx.ext.autodoc (1.7.5) from /usr/lib/python3.6/site-packages/sphinx/ext/autodoc/__init__.py
# sphinx.ext.todo (1.7.5) from /usr/lib/python3.6/site-packages/sphinx/ext/todo.py
# sphinx.ext.autosummary (1.7.5) from /usr/lib/python3.6/site-packages/sphinx/ext/autosummary/__init__.py
# sphinx.ext.intersphinx (1.7.5) from /usr/lib/python3.6/site-packages/sphinx/ext/intersphinx.py
# sphinx.ext.viewcode (1.7.5) from /usr/lib/python3.6/site-packages/sphinx/ext/viewcode.py
# sphinxcontrib_trio (1.0.1) from /usr/lib/python3.6/site-packages/sphinxcontrib_trio/__init__.py
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/sphinx/cmdline.py", line 304, in main
app.build(args.force_all, filenames)
File "/usr/lib/python3.6/site-packages/sphinx/application.py", line 331, in buildself.builder.build_update()
File "/usr/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 342, in build_update'out of date'%len(to_build))
File "/usr/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 355, in build
updated_docnames =set(self.env.update(self.config, self.srcdir, self.doctreedir))
File "/usr/lib/python3.6/site-packages/sphinx/environment/__init__.py", line 565, in updateself._read_serial(docnames, self.app)
File "/usr/lib/python3.6/site-packages/sphinx/environment/__init__.py", line 584, in _read_serialself.read_doc(docname, app)
File "/usr/lib/python3.6/site-packages/sphinx/environment/__init__.py", line 659, in read_doc
doctree = read_doc(self.app, self, self.doc2path(docname))
File "/usr/lib/python3.6/site-packages/sphinx/io.py", line 294, in read_doc
pub.publish()
File "/usr/lib/python3.6/site-packages/docutils/core.py", line 217, in publishself.settings)
File "/usr/lib/python3.6/site-packages/docutils/readers/__init__.py", line 72, in readself.parse()
File "/usr/lib/python3.6/site-packages/docutils/readers/__init__.py", line 78, in parseself.parser.parse(self.input, document)
File "/usr/lib/python3.6/site-packages/sphinx/parsers.py", line 85, in parseself.statemachine.run(inputstring, document, inliner=self.inliner)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 171, in run
input_source=document['source'])
File "/usr/lib/python3.6/site-packages/docutils/statemachine.py", line 239, in run
context, state, transitions)
File "/usr/lib/python3.6/site-packages/docutils/statemachine.py", line 460, in check_linereturn method(match, context, next_state)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2753, in underlineself.section(title, source, style, lineno -1, messages)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 327, in sectionself.new_subsection(title, lineno, messages)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection
node=section_node, match_titles=True)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse
node=node, match_titles=match_titles)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 196, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python3.6/site-packages/docutils/statemachine.py", line 239, in run
context, state, transitions)
File "/usr/lib/python3.6/site-packages/docutils/statemachine.py", line 460, in check_linereturn method(match, context, next_state)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2753, in underlineself.section(title, source, style, lineno -1, messages)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 327, in sectionself.new_subsection(title, lineno, messages)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection
node=section_node, match_titles=True)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse
node=node, match_titles=match_titles)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 196, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python3.6/site-packages/docutils/statemachine.py", line 239, in run
context, state, transitions)
File "/usr/lib/python3.6/site-packages/docutils/statemachine.py", line 460, in check_linereturn method(match, context, next_state)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2753, in underlineself.section(title, source, style, lineno -1, messages)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 327, in sectionself.new_subsection(title, lineno, messages)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 395, in new_subsection
node=section_node, match_titles=True)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 282, in nested_parse
node=node, match_titles=match_titles)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 196, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python3.6/site-packages/docutils/statemachine.py", line 239, in run
context, state, transitions)
File "/usr/lib/python3.6/site-packages/docutils/statemachine.py", line 460, in check_linereturn method(match, context, next_state)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2326, in explicit_markup
nodelist, blank_finish =self.explicit_construct(match)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2338, in explicit_constructreturn method(self, expmatch)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2081, in directive
directive_class, match, type_name, option_presets)
File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/states.py", line 2130, in run_directive
result = directive_instance.run()
File "/usr/lib/python3.6/site-packages/sphinx/ext/autodoc/directive.py", line 133, in run
documenter.generate(more_content=self.content)
File "/usr/lib/python3.6/site-packages/sphinx/ext/autodoc/__init__.py", line 747, in generateifnotself.import_object():
File "/usr/lib/python3.6/site-packages/sphinxcontrib_trio/__init__.py", line 350, in import_object
obj =self.parent.__dict__.get(self.object_name)
AttributeError: 'NoneType' object has no attribute '__dict__'
From a quick skim, I think the issue is that somehow autodoc was trying to look up an unknown method (e.g. .. automethod:: SomeClass.misspelled_nmae), and we're crashing instead of reporting a proper error message.
Specifically, it looks like we need to port this fix: sphinx-doc/sphinx@1d742bd into sphinxcontrib-trio's version of MethodDocumentor.import_object
Well, I'm not entirely sure whether that's the actual issue because I'm not sure what exactly @thmo was doing or how to reproduce it, but this seems like a good idea regardless :-)
The text was updated successfully, but these errors were encountered:
@thmo reported this crash when building the pytest docs (apparently they use sphinxcontrib-trio now, I had no idea :-)):
From a quick skim, I think the issue is that somehow autodoc was trying to look up an unknown method (e.g.
.. automethod:: SomeClass.misspelled_nmae
), and we're crashing instead of reporting a proper error message.Specifically, it looks like we need to port this fix: sphinx-doc/sphinx@1d742bd into sphinxcontrib-trio's version of
MethodDocumentor.import_object
Well, I'm not entirely sure whether that's the actual issue because I'm not sure what exactly @thmo was doing or how to reproduce it, but this seems like a good idea regardless :-)
The text was updated successfully, but these errors were encountered: