sphinx
sphinx copied to clipboard
Error while building docs
Describe the bug
While building docs on readthedocs.org, arrived a this command:
/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/bin/python -m sphinx -T -E -W --keep-going -b html -d _build/doctrees -D language=en . _build/html
I get this stacktrace:
Running Sphinx v5.1.1
making output directory... done
[autosummary] generating autosummary for: app.rst, database.rst, entities.rst, exceptions.rst, git_connector.rst, handlers.rst, index.rst, managers.rst, model.rst, utils.rst
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 10 source files that are out of date
updating environment: [new config] 10 added, 0 changed, 0 removed
reading sources... [ 10%] app
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/sphinx/cmd/build.py", line 277, in build_main
app.build(args.force_all, filenames)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/sphinx/application.py", line 349, in build
self.builder.build_update()
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 301, in build_update
self.build(to_build,
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 317, in build
updated_docnames = set(self.read())
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 424, in read
self._read_serial(docnames)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 445, in _read_serial
self.read_doc(docname)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 498, in read_doc
publisher.publish()
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/core.py", line 217, in publish
self.document = self.reader.read(self.source, self.parser,
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/sphinx/io.py", line 104, in read
self.parse()
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/readers/__init__.py", line 78, in parse
self.parser.parse(self.input, document)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/sphinx/parsers.py", line 78, in parse
self.statemachine.run(inputlines, document, inliner=self.inliner)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/parsers/rst/states.py", line 170, in run
results = StateMachineWS.run(self, input_lines, input_offset,
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/statemachine.py", line 239, in run
context, next_state, result = self.check_line(
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/statemachine.py", line 451, in check_line
return method(match, context, next_state)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/parsers/rst/states.py", line 3008, in text
self.section(title.lstrip(), source, style, lineno + 1, messages)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/parsers/rst/states.py", line 327, in section
self.new_subsection(title, lineno, messages)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/parsers/rst/states.py", line 393, in new_subsection
newabsoffset = self.nested_parse(
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/parsers/rst/states.py", line 281, in nested_parse
state_machine.run(block, input_offset, memo=self.memo,
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/parsers/rst/states.py", line 196, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/statemachine.py", line 239, in run
context, next_state, result = self.check_line(
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/statemachine.py", line 451, in check_line
return method(match, context, next_state)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/parsers/rst/states.py", line 2769, in underline
self.section(title, source, style, lineno - 1, messages)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/parsers/rst/states.py", line 327, in section
self.new_subsection(title, lineno, messages)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/parsers/rst/states.py", line 393, in new_subsection
newabsoffset = self.nested_parse(
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/parsers/rst/states.py", line 281, in nested_parse
state_machine.run(block, input_offset, memo=self.memo,
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/parsers/rst/states.py", line 196, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/statemachine.py", line 239, in run
context, next_state, result = self.check_line(
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/statemachine.py", line 451, in check_line
return method(match, context, next_state)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/parsers/rst/states.py", line 2342, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/parsers/rst/states.py", line 2354, in explicit_construct
return method(self, expmatch)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/parsers/rst/states.py", line 2096, in directive
return self.run_directive(
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/docutils/parsers/rst/states.py", line 2146, in run_directive
result = directive_instance.run()
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/sphinx/ext/autodoc/directive.py", line 148, in run
documenter.generate(more_content=self.content)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/sphinx/ext/autodoc/__init__.py", line 1788, in generate
return super().generate(more_content=more_content,
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/sphinx/ext/autodoc/__init__.py", line 954, in generate
self.document_members(all_members)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/sphinx/ext/autodoc/__init__.py", line 1779, in document_members
super().document_members(all_members)
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/sphinx/ext/autodoc/__init__.py", line 813, in document_members
classes = [cls for cls in self.documenters.values()
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/sphinx/ext/autodoc/__init__.py", line 814, in <listcomp>
if cls.can_document_member(member, mname, isattr, self)]
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/sphinx/ext/autodoc/__init__.py", line 2096, in can_document_member
return inspect.isNewType(member) and isattr
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/sphinx/util/inspect.py", line 153, in isNewType
return isinstance(obj, typing.NewType)
TypeError: isinstance() arg 2 must be a type, a tuple of types or a union
Exception occurred:
File "/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/lib/python3.10/site-packages/sphinx/util/inspect.py", line 153, in isNewType
return isinstance(obj, typing.NewType)
TypeError: isinstance() arg 2 must be a type, a tuple of types or a union
The full traceback has been saved in /tmp/sphinx-err-s2xus_f2.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
How to Reproduce
/home/docs/checkouts/readthedocs.org/user_builds/thesys/envs/latest/bin/python -m sphinx -T -E -W --keep-going -b html -d _build/doctrees -D language=en . _build/html
EDIT: Running the same command in my local repository, I don't get any error at all
Expected behavior
No response
Your project
https://github.com/RiccardoBarbieri/thesis
Screenshots
No response
OS
linux
Python version
3.10
Sphinx version
5.1.1
Sphinx extensions
No response
Extra tools
No response
Additional context
No response