Auto-Doc build fail
Readthedocs auto-build fails for some reason. Seems like something is wrong with sphinx-autodoc-typehints package.
Error message:
[rtd-command-info] start-time: 2023-02-14T16:42:55.038886Z, end-time: 2023-02-14T16:42:56.165913Z, duration: 1, exit-code: 2
python -m sphinx -T -E -b html -d _build/doctrees -D language=en . ../../_readthedocs/html
Running Sphinx v6.1.3
making output directory... done
WARNING: html_static_path entry '_static' does not exist
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 9 source files that are out of date
updating environment: [new config] 9 added, 0 changed, 0 removed
reading sources... [ 11%] index
reading sources... [ 22%] installation
reading sources... [ 33%] modules
reading sources... [ 44%] pythia
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx/events.py", line 96, in emit
results.append(listener.handler(self.app, *args))
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx_autodoc_typehints-1.23.4-py3.8.egg/sphinx_autodoc_typehints/__init__.py", line 539, in process_docstring
_inject_types_to_docstring(type_hints, signature, original_obj, app, what, name, lines)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx_autodoc_typehints-1.23.4-py3.8.egg/sphinx_autodoc_typehints/__init__.py", line 601, in _inject_types_to_docstring
_inject_rtype(type_hints, original_obj, app, what, name, lines)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx_autodoc_typehints-1.23.4-py3.8.egg/sphinx_autodoc_typehints/__init__.py", line 747, in _inject_rtype
r = get_insert_index(app, lines)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx_autodoc_typehints-1.23.4-py3.8.egg/sphinx_autodoc_typehints/__init__.py", line 725, in get_insert_index
at = line_before_node(doc.children[idx])
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx_autodoc_typehints-1.23.4-py3.8.egg/sphinx_autodoc_typehints/__init__.py", line 664, in line_before_node
assert line
AssertionError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx/cmd/build.py", line 284, in build_main
app.build(args.force_all, args.filenames)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx/application.py", line 347, in build
self.builder.build_update()
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 311, in build_update
self.build(to_build,
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 327, in build
updated_docnames = set(self.read())
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 434, in read
self._read_serial(docnames)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 455, in _read_serial
self.read_doc(docname)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 511, in read_doc
publisher.publish()
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/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/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx/io.py", line 105, in read
self.parse()
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/docutils/readers/__init__.py", line 78, in parse
self.parser.parse(self.input, document)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx/parsers.py", line 80, in parse
self.statemachine.run(inputlines, document, inliner=self.inliner)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/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/pythia-uq/envs/latest/lib/python3.8/site-packages/docutils/statemachine.py", line 240, in run
context, next_state, result = self.check_line(
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/docutils/statemachine.py", line 452, in check_line
return method(match, context, next_state)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2779, in underline
self.section(title, source, style, lineno - 1, messages)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/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/pythia-uq/envs/latest/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 393, in new_subsection
newabsoffset = self.nested_parse(
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/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/pythia-uq/envs/latest/lib/python3.8/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/pythia-uq/envs/latest/lib/python3.8/site-packages/docutils/statemachine.py", line 240, in run
context, next_state, result = self.check_line(
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/docutils/statemachine.py", line 452, in check_line
return method(match, context, next_state)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2779, in underline
self.section(title, source, style, lineno - 1, messages)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/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/pythia-uq/envs/latest/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 393, in new_subsection
newabsoffset = self.nested_parse(
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/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/pythia-uq/envs/latest/lib/python3.8/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/pythia-uq/envs/latest/lib/python3.8/site-packages/docutils/statemachine.py", line 240, in run
context, next_state, result = self.check_line(
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/docutils/statemachine.py", line 452, in check_line
return method(match, context, next_state)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2352, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2364, in explicit_construct
return method(self, expmatch)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2101, in directive
return self.run_directive(
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2151, in run_directive
result = directive_instance.run()
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx/ext/autodoc/directive.py", line 136, in run
documenter.generate(more_content=self.content)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 940, in generate
self.document_members(all_members)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 814, in document_members
documenter.generate(
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 937, in generate
self.add_content(more_content)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 605, in add_content
for i, line in enumerate(self.process_doc(docstrings)):
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 550, in process_doc
self.env.app.emit('autodoc-process-docstring',
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx/application.py", line 458, in emit
return self.events.emit(event, *args, allowed_exceptions=allowed_exceptions)
File "/home/docs/checkouts/readthedocs.org/user_builds/pythia-uq/envs/latest/lib/python3.8/site-packages/sphinx/events.py", line 107, in emit
raise ExtensionError(__("Handler %r for event %r threw an exception") %
sphinx.errors.ExtensionError: Handler <function process_docstring at 0x7f3aed4083a0> for event 'autodoc-process-docstring' threw an exception (exception: )
Extension error (sphinx_autodoc_typehints):
Handler <function process_docstring at 0x7f3aed4083a0> for event 'autodoc-process-docstring' threw an exception (exception: )