-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
documentation build fails with manpage sphinx builder #241
Comments
We've only been actively supporting the HTML builders. You may need to use a different theme for other sphinx builders. |
trying replacing any |
I was able to suppress the error with the following patch: diff --git a/sphinx_immaterial/kbd_keys.py b/sphinx_immaterial/kbd_keys.py
index 5356db2..67d6fa2 100644
--- a/sphinx_immaterial/kbd_keys.py
+++ b/sphinx_immaterial/kbd_keys.py
@@ -93,6 +93,7 @@ def setup(app: Sphinx):
kbd_node,
html=(visit_kbd, depart_kbd),
latex=(visit_kbd_latex, depart_kbd_latex),
+ man=(visit_kbd, depart_kbd),
)
return {
"parallel_read_safe": True, But other theme extensions would need more work to make them compatible with the ManPage builder, namely the mermaid diagrams. |
OK one sec let me check that in my build env 😋 |
Yeah .. indeed it fails in + /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v6.1.3
making output directory... done
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://www.sphinx-doc.org/en/master/objects.inv...
[1/2] Loading JSON schema: apidoc/json/index_transform_schema.yml
[2/2] Loading JSON schema: apidoc/json/inheritance_schema.yml
Parsed C++ input in 0.00671 seconds
Found 19 C++ declarations
building [mo]: targets for 0 po files that are out of date
writing output...
building [man]: all manpages
updating environment: [new config] 88 added, 0 changed, 0 removed
reading sources... [100%] task_lists
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-sphinx-immaterial.3 { customization admonitions content_tabs task_lists keys code_syntax_highlighting code_annotations apidoc/index apidoc/format_signatures apidoc/python/index apidoc/python/apigen apidoc/cpp/index apidoc/cpp/external_cpp_references apidoc/cpp/cppreference apidoc/cpp/apigen apidoc/json/domain inline_icons graphviz mermaid_diagrams demo_api python_apigen_demo python_apigen_generated/Dim python_apigen_generated/Dim.__init__-unbounded python_apigen_generated/Dim.__init__-size python_apigen_generated/Dim.__init__-exclusive_max python_apigen_generated/Dim.__init__-inclusive_max python_apigen_generated/Dim.exclusive_max python_apigen_generated/Dim.inclusive_min python_apigen_generated/Dim.label python_apigen_generated/Dim.size python_apigen_generated/DimExpression python_apigen_generated/DimExpression.__getitem__ python_apigen_generated/DimExpression.diagonal python_apigen_generated/DimExpression.label python_apigen_generated/DimExpression.translate_to python_apigen_generated/DimExpression.vindex python_apigen_generated/IndexDomain python_apigen_generated/IndexDomain.__init__-components python_apigen_generated/IndexDomain.__init__-dimensions python_apigen_generated/IndexDomain.__init__-json python_apigen_generated/IndexDomain.__getitem__-identifier python_apigen_generated/IndexDomain.__getitem__-selection python_apigen_generated/IndexDomain.__getitem__-domain python_apigen_generated/IndexDomain.__getitem__-expr python_apigen_generated/IndexDomain.__getitem__-transform python_apigen_generated/IndexDomain.to_json python_apigen_generated/IndexDomain.exclusive_max python_apigen_generated/IndexDomain.inclusive_min python_apigen_generated/IndexDomain.labels python_apigen_generated/IndexDomain.origin python_apigen_generated/IndexDomain.rank python_apigen_generated/IndexDomain.shape python_apigen_generated/IndexDomain.size python_apigen_generated/DimensionSelection python_apigen_generated/DimensionSelection.foo python_apigen_generated/bar python_apigen_generated/VeryLongClassNameForTestingOutWordWrapping python_apigen_generated/VeryLongClassNameForTestingOutWordWrapping.very_long_method_name_for_testing_out_word_wrapper python_apigen_generated/Foo python_apigen_generated/Foo.bar python_apigen_generated/FooSubclass python_apigen_generated/FooSubclass.baz python_apigen_generated/FooSubclass.overloaded_method cpp_apigen_demo cpp_apigen_generated/cpp_apigen_demo.IndexInterval cpp_apigen_generated/cpp_apigen_demo.IndexInterval.IndexInterval cpp_apigen_generated/cpp_apigen_demo.IndexInterval.operator-shift_left cpp_apigen_generated/cpp_apigen_demo.IndexInterval.lower cpp_apigen_generated/cpp_apigen_demo.IndexInterval.upper cpp_apigen_generated/cpp_apigen_demo.Union cpp_apigen_generated/cpp_apigen_demo.DataOrder cpp_apigen_generated/cpp_apigen_demo.operator-shift_left cpp_apigen_generated/cpp_apigen_demo.Array cpp_apigen_generated/cpp_apigen_demo.Array.Array-data-shape cpp_apigen_generated/cpp_apigen_demo.Array.Array-convert cpp_apigen_generated/cpp_apigen_demo.Array.data cpp_apigen_generated/cpp_apigen_demo.Array.shape cpp_apigen_generated/cpp_apigen_demo.Array.order cpp_apigen_generated/cpp_apigen_demo.Array.operator-subscript specimen rst_basics rst-cheatsheet/rst-cheatsheet additional_samples subpage1 subpage1subpage1 subpage1subpage2 subpage2 } /home/tkloczko/rpmbuild/BUILD/sphinx-immaterial-0.11.3/docs/mermaid_diagrams.rst:63: WARNING: unknown node type: <mermaid_node: <literal...>>
failed
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 284, in build_main
app.build(args.force_all, args.filenames)
File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 347, in build
self.builder.build_update()
File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 308, in build_update
self.build(['__all__'], to_build)
File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 377, in build
self.write(docnames, list(updated_docnames), method)
File "/usr/lib/python3.8/site-packages/sphinx/util/display.py", line 85, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/sphinx/builders/manpage.py", line 101, in write
docwriter.write(largetree, destination)
File "/usr/lib/python3.8/site-packages/docutils/writers/__init__.py", line 77, in write
self.translate()
File "/usr/lib/python3.8/site-packages/sphinx/writers/manpage.py", line 34, in translate
self.document.walkabout(visitor)
File "/usr/lib/python3.8/site-packages/docutils/nodes.py", line 186, in walkabout
if child.walkabout(visitor):
File "/usr/lib/python3.8/site-packages/docutils/nodes.py", line 186, in walkabout
if child.walkabout(visitor):
File "/usr/lib/python3.8/site-packages/docutils/nodes.py", line 186, in walkabout
if child.walkabout(visitor):
[Previous line repeated 7 more times]
File "/usr/lib/python3.8/site-packages/docutils/nodes.py", line 199, in walkabout
visitor.dispatch_departure(self)
File "/usr/lib/python3.8/site-packages/sphinx/util/docutils.py", line 588, in dispatch_departure
super().dispatch_departure(node)
File "/usr/lib/python3.8/site-packages/docutils/nodes.py", line 2018, in dispatch_departure
return method(node)
File "/usr/lib/python3.8/site-packages/docutils/nodes.py", line 2040, in unknown_departure
raise NotImplementedError(
NotImplementedError: <class 'sphinx.writers.manpage.ManualPageTranslator'> departing unknown node type: mermaid_node
Exception occurred:
File "/usr/lib/python3.8/site-packages/docutils/nodes.py", line 2040, in unknown_departure
raise NotImplementedError(
NotImplementedError: <class 'sphinx.writers.manpage.ManualPageTranslator'> departing unknown node type: mermaid_node
The full traceback has been saved in /tmp/sphinx-err-5x9hwfei.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! |
If I remove all mermaid diagrams from the docs' src, I still run into problems inherent in the
|
sphinx-immaterial
documentation build fails
gentle ping .. any update? 🤔 |
Sorry there are no current plans to support the manage builder, and it clearly isn't a simple patch... |
Looking on sphinx output seems like this issue has nothing to do with man page format because html rendering fails as well [tkloczko@pers-jacek sphinx-immaterial-0.11.7]$ PYTHONPATH=$PWD /usr/bin/sphinx-build -n -T -b html docs build/sphinx/html
Running Sphinx v7.1.2
making output directory... done
loading intersphinx inventory from https://docs.python.org/3/objects.inv...
loading intersphinx inventory from https://www.sphinx-doc.org/en/master/objects.inv...
loading intersphinx inventory from https://myst-parser.readthedocs.io/en/latest/objects.inv...
[1/2] Loading JSON schema: apidoc/json/index_transform_schema.yml
[2/2] Loading JSON schema: apidoc/json/inheritance_schema.yml
Parsed C++ input in 0.00634 seconds
Found 19 C++ declarations
myst v2.0.0: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions={'attrs_inline', 'smartquotes', 'deflist', 'replacements', 'fieldlist', 'tasklist', 'strikethrough', 'substitution', 'attrs_block'}, disable_syntax=[], all_links_external=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, fence_as_directive=set(), number_code_blocks=[], title_to_header=False, heading_anchors=0, heading_slug_func=None, html_meta={}, footnote_transition=True, words_per_minute=200, substitutions={role: ...}, linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', enable_checkboxes=True, suppress_warnings=[], highlight_code_blocks=True)
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 89 source files that are out of date
updating environment: [new config] 89 added, 0 changed, 0 removed
reading sources... [ 2%] admonitions
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 290, in build_main
app.build(args.force_all, args.filenames)
File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 351, in build
self.builder.build_update()
File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 290, in build_update
self.build(to_build,
File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 310, in build
updated_docnames = set(self.read())
File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 417, in read
self._read_serial(docnames)
File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 438, in _read_serial
self.read_doc(docname)
File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 494, in read_doc
publisher.publish()
File "/usr/lib/python3.8/site-packages/docutils/core.py", line 234, in publish
self.document = self.reader.read(self.source, self.parser,
File "/usr/lib/python3.8/site-packages/sphinx/io.py", line 104, in read
self.parse()
File "/usr/lib/python3.8/site-packages/docutils/readers/__init__.py", line 76, in parse
self.parser.parse(self.input, document)
File "/usr/lib/python3.8/site-packages/sphinx/parsers.py", line 80, in parse
self.statemachine.run(inputlines, document, inliner=self.inliner)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 169, in run
results = StateMachineWS.run(self, input_lines, input_offset,
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 233, in run
context, next_state, result = self.check_line(
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 445, in check_line
return method(match, context, next_state)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2785, in underline
self.section(title, source, style, lineno - 1, messages)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 325, in section
self.new_subsection(title, lineno, messages)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 391, in new_subsection
newabsoffset = self.nested_parse(
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 279, in nested_parse
state_machine.run(block, input_offset, memo=self.memo,
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 233, in run
context, next_state, result = self.check_line(
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 445, in check_line
return method(match, context, next_state)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2785, in underline
self.section(title, source, style, lineno - 1, messages)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 325, in section
self.new_subsection(title, lineno, messages)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 391, in new_subsection
newabsoffset = self.nested_parse(
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 279, in nested_parse
state_machine.run(block, input_offset, memo=self.memo,
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 233, in run
context, next_state, result = self.check_line(
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 445, in check_line
return method(match, context, next_state)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2355, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2367, in explicit_construct
return method(self, expmatch)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2104, in directive
return self.run_directive(
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2154, in run_directive
result = directive_instance.run()
File "/usr/lib/python3.8/site-packages/sphinx/domains/__init__.py", line 286, in run
return super().run()
File "/home/tkloczko/rpmbuild/BUILD/sphinx-immaterial-0.11.7/sphinx_immaterial/apidoc/object_toc.py", line 262, in run
nodes = orig_run(self)
File "/home/tkloczko/rpmbuild/BUILD/sphinx-immaterial-0.11.7/sphinx_immaterial/apidoc/object_toc.py", line 206, in run
nodes = orig_run(self)
File "/usr/lib/python3.8/site-packages/sphinx/directives/__init__.py", line 266, in run
nested_parse_with_titles(self.state, self.content, contentnode, self.content_offset)
File "/usr/lib/python3.8/site-packages/sphinx/util/nodes.py", line 327, in nested_parse_with_titles
return state.nested_parse(content, content_offset, node, match_titles=1)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 279, in nested_parse
state_machine.run(block, input_offset, memo=self.memo,
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 233, in run
context, next_state, result = self.check_line(
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 445, in check_line
return method(match, context, next_state)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2355, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2367, in explicit_construct
return method(self, expmatch)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2104, in directive
return self.run_directive(
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2154, in run_directive
result = directive_instance.run()
File "/usr/lib/python3.8/site-packages/sphinx/ext/autodoc/directive.py", line 146, in run
result = parse_generated_content(self.state, params.result, documenter)
File "/usr/lib/python3.8/site-packages/sphinx/ext/autodoc/directive.py", line 89, in parse_generated_content
nested_parse_with_titles(state, content, node)
File "/usr/lib/python3.8/site-packages/sphinx/util/nodes.py", line 327, in nested_parse_with_titles
return state.nested_parse(content, content_offset, node, match_titles=1)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 279, in nested_parse
state_machine.run(block, input_offset, memo=self.memo,
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 233, in run
context, next_state, result = self.check_line(
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 445, in check_line
return method(match, context, next_state)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2355, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2367, in explicit_construct
return method(self, expmatch)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2104, in directive
return self.run_directive(
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2154, in run_directive
result = directive_instance.run()
File "/usr/lib/python3.8/site-packages/sphinx/domains/__init__.py", line 286, in run
return super().run()
File "/home/tkloczko/rpmbuild/BUILD/sphinx-immaterial-0.11.7/sphinx_immaterial/apidoc/object_toc.py", line 262, in run
nodes = orig_run(self)
File "/home/tkloczko/rpmbuild/BUILD/sphinx-immaterial-0.11.7/sphinx_immaterial/apidoc/object_toc.py", line 206, in run
nodes = orig_run(self)
File "/usr/lib/python3.8/site-packages/sphinx/directives/__init__.py", line 266, in run
nested_parse_with_titles(self.state, self.content, contentnode, self.content_offset)
File "/usr/lib/python3.8/site-packages/sphinx/util/nodes.py", line 327, in nested_parse_with_titles
return state.nested_parse(content, content_offset, node, match_titles=1)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 279, in nested_parse
state_machine.run(block, input_offset, memo=self.memo,
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 233, in run
context, next_state, result = self.check_line(
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 445, in check_line
return method(match, context, next_state)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2357, in explicit_markup
self.explicit_list(blank_finish)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2382, in explicit_list
newline_offset, blank_finish = self.nested_list_parse(
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 316, in nested_list_parse
state_machine.run(block, input_offset, memo=self.memo,
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 233, in run
context, next_state, result = self.check_line(
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 445, in check_line
return method(match, context, next_state)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2660, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2367, in explicit_construct
return method(self, expmatch)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2104, in directive
return self.run_directive(
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2154, in run_directive
result = directive_instance.run()
File "/usr/lib/python3.8/site-packages/sphinx/ext/autodoc/directive.py", line 146, in run
result = parse_generated_content(self.state, params.result, documenter)
File "/usr/lib/python3.8/site-packages/sphinx/ext/autodoc/directive.py", line 89, in parse_generated_content
nested_parse_with_titles(state, content, node)
File "/usr/lib/python3.8/site-packages/sphinx/util/nodes.py", line 327, in nested_parse_with_titles
return state.nested_parse(content, content_offset, node, match_titles=1)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 279, in nested_parse
state_machine.run(block, input_offset, memo=self.memo,
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 195, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 233, in run
context, next_state, result = self.check_line(
File "/usr/lib/python3.8/site-packages/docutils/statemachine.py", line 445, in check_line
return method(match, context, next_state)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2355, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2367, in explicit_construct
return method(self, expmatch)
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2104, in directive
return self.run_directive(
File "/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2154, in run_directive
result = directive_instance.run()
File "/usr/lib/python3.8/site-packages/sphinx/domains/__init__.py", line 286, in run
return super().run()
File "/home/tkloczko/rpmbuild/BUILD/sphinx-immaterial-0.11.7/sphinx_immaterial/apidoc/object_toc.py", line 262, in run
nodes = orig_run(self)
File "/home/tkloczko/rpmbuild/BUILD/sphinx-immaterial-0.11.7/sphinx_immaterial/apidoc/object_toc.py", line 206, in run
nodes = orig_run(self)
File "/usr/lib/python3.8/site-packages/sphinx/directives/__init__.py", line 237, in run
name = self.handle_signature(sig, signode)
File "/home/tkloczko/rpmbuild/BUILD/sphinx-immaterial-0.11.7/sphinx_immaterial/apidoc/python/attribute_style.py", line 20, in handle_signature
signode += sphinx.domains.python._parse_annotation(typ, self.env)
File "/home/tkloczko/rpmbuild/BUILD/sphinx-immaterial-0.11.7/sphinx_immaterial/apidoc/python/type_annotation_transforms.py", line 265, in _parse_annotation
tree = ast.fix_missing_locations(transformer.visit(tree))
File "/usr/lib64/python3.8/ast.py", line 371, in visit
return visitor(node)
File "/usr/lib64/python3.8/ast.py", line 447, in generic_visit
value = self.visit(value)
File "/usr/lib64/python3.8/ast.py", line 371, in visit
return visitor(node)
File "/usr/lib64/python3.8/ast.py", line 456, in generic_visit
new_node = self.visit(old_value)
File "/usr/lib64/python3.8/ast.py", line 371, in visit
return visitor(node)
File "/usr/lib64/python3.8/ast.py", line 456, in generic_visit
new_node = self.visit(old_value)
File "/usr/lib64/python3.8/ast.py", line 371, in visit
return visitor(node)
File "/home/tkloczko/rpmbuild/BUILD/sphinx-immaterial-0.11.7/sphinx_immaterial/apidoc/python/type_annotation_transforms.py", line 247, in visit_Subscript
return self._transform_subscript_pep604(node)[0]
File "/home/tkloczko/rpmbuild/BUILD/sphinx-immaterial-0.11.7/sphinx_immaterial/apidoc/python/type_annotation_transforms.py", line 220, in _transform_subscript_pep604
id_str = _get_ast_dotted_name(value)
File "/home/tkloczko/rpmbuild/BUILD/sphinx-immaterial-0.11.7/sphinx_immaterial/apidoc/python/type_annotation_transforms.py", line 115, in _get_ast_dotted_name
parent = _get_ast_dotted_name(cast(Union[ast.Name, ast.Attribute], node.value))
File "/home/tkloczko/rpmbuild/BUILD/sphinx-immaterial-0.11.7/sphinx_immaterial/apidoc/python/type_annotation_transforms.py", line 115, in _get_ast_dotted_name
parent = _get_ast_dotted_name(cast(Union[ast.Name, ast.Attribute], node.value))
AttributeError: 'NoneType' object has no attribute 'value'
Exception occurred:
File "/home/tkloczko/rpmbuild/BUILD/sphinx-immaterial-0.11.7/sphinx_immaterial/apidoc/python/type_annotation_transforms.py", line 115, in _get_ast_dotted_name
parent = _get_ast_dotted_name(cast(Union[ast.Name, ast.Attribute], node.value))
AttributeError: 'NoneType' object has no attribute 'value'
The full traceback has been saved in /tmp/sphinx-err-9ir5eb3y.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! |
The original error (shown on OP) indicated that it was related to the manpage builder. Can you submit a zip file that can reproduce this? |
Hmm .. what kind of zip file? 🤔 |
Given the error (in latest sphinx output) failed to understand the parsed AST of the python API you are documenting, I'm more interested in seeing what python (or document) source is being used. The zip file would be a sample project that uses this theme in sphinx (much like a demo repo). |
Did you change the documentation source since opening this ticket? I'm getting the feeling like this new error is a separate issue. |
I'm packaging your module as rpm package and build process downloads automatically source tar ball from git tag. |
Oh! I still think the new html builder error is a separate issue since there have been updates in sphinx, this theme, and python since you opened this ticket. However, I'm not sure why the AST error occurs in your env with the html builder; it might have something to do with using python 3.8. Currently, our CI uses all the latest dependencies (with python 3.11.5) to build our docs. Note: we are having problems building with python 3.11.5 on Windows (SSL related). |
I should clearly mention as well that in mena time I've updated sphinx to 7.1.2 in my set od packaged python modules. |
Looks like
sphinx-immaterial
needs to be updated for latest sphinxHere is list of installed modules in build env
The text was updated successfully, but these errors were encountered: