sphinx-doc / sphinx

The Sphinx documentation generator
https://www.sphinx-doc.org/
Other
6.6k stars 2.12k forks source link

NotImplementedError: unknown node: diagrams #9919

Closed AndreasLuckert closed 1 year ago

AndreasLuckert commented 2 years ago

Describe the bug

I ran this command in bash to build the sphinx docs and push them to confluence: sphinx-build -E -a docs/source docs/build/confluence -b confluence

The error-logfile has the following output:

# Sphinx version: 4.2.0
# Python version: 3.9.4 (CPython)
# Docutils version: 0.16 release
# Jinja2 version: 2.11.3
# Last messages:
#   pickling environment...
#   done
#   checking consistency...
#   done
#   preparing documents...
#   done
#   writing output... [  6%] apidoc/ics
#   writing output... [ 12%] apidoc/ics.plugins
#   writing output... [ 18%] apidoc/modules
#   writing output... [ 25%] architecture
# Loaded extensions:
#   sphinx.ext.mathjax (4.2.0) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx\ext\mathjax.py
#   sphinxcontrib.applehelp (1.0.2) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinxcontrib\applehelp\__init__.py
#   sphinxcontrib.devhelp (1.0.2) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinxcontrib\devhelp\__init__.py
#   sphinxcontrib.htmlhelp (2.0.0) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinxcontrib\htmlhelp\__init__.py
#   sphinxcontrib.serializinghtml (1.1.5) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinxcontrib\serializinghtml\__init__.py
#   sphinxcontrib.qthelp (1.0.3) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinxcontrib\qthelp\__init__.py
#   alabaster (0.7.12) from c:\Users\username\Projects\proj-venv\lib\site-packages\alabaster\__init__.py
#   recommonmark (0.7.1) from c:\Users\username\Projects\proj-venv\lib\site-packages\recommonmark\__init__.py
#   sphinx.ext.autodoc.preserve_defaults (1.0) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx\ext\autodoc\preserve_defaults.py
#   sphinx.ext.autodoc.type_comment (4.2.0) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx\ext\autodoc\type_comment.py
#   sphinx.ext.autodoc (4.2.0) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx\ext\autodoc\__init__.py
#   sphinx.ext.extlinks (4.2.0) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx\ext\extlinks.py
#   sphinx.ext.graphviz (4.2.0) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx\ext\graphviz.py
#   sphinx.ext.inheritance_diagram (4.2.0) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx\ext\inheritance_diagram.py
#   sphinx.ext.intersphinx (4.2.0) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx\ext\intersphinx.py
#   sphinx.ext.napoleon (4.2.0) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx\ext\napoleon\__init__.py
#   sphinx.ext.todo (4.2.0) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx\ext\todo.py
#   sphinx.ext.viewcode (4.2.0) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx\ext\viewcode.py
#   sphinx_diagrams (4.2.0) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx_diagrams\__init__.py
#   sphinx_rtd_theme (unknown version) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx_rtd_theme\__init__.py
#   sphinxcontrib.confluencebuilder (1.5.0) from c:\Users\username\Projects\proj-venv\lib\site-packages\sphinxcontrib\confluencebuilder\__init__.py
Traceback (most recent call last):
  File "c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx\cmd\build.py", line 280, in build_main
    app.build(args.force_all, filenames)
  File "c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx\application.py", line 337, in build
    self.builder.build_all()
  File "c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx\builders\__init__.py", line 257, in build_all
    self.build(None, summary=__('all source files'), method='all')
  File "c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx\builders\__init__.py", line 357, in build
    self.write(docnames, list(updated_docnames), method)
  File "c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx\builders\__init__.py", line 531, in write
    self._write_serial(sorted(docnames))
  File "c:\Users\username\Projects\proj-venv\lib\site-packages\sphinx\builders\__init__.py", line 541, in _write_serial
    self.write_doc(docname, doctree)
  File "c:\Users\username\Projects\proj-venv\lib\site-packages\sphinxcontrib\confluencebuilder\builder.py", line 417, in write_doc
    self.writer.write(doctree, destination)
  File "c:\Users\username\Projects\proj-venv\lib\site-packages\docutils\writers\__init__.py", line 78, in write
    self.translate()
  File "c:\Users\username\Projects\proj-venv\lib\site-packages\sphinxcontrib\confluencebuilder\writer.py", line 24, in translate
    self.document.walkabout(visitor)
  File "c:\Users\username\Projects\proj-venv\lib\site-packages\docutils\nodes.py", line 214, in walkabout
    if child.walkabout(visitor):
  File "c:\Users\username\Projects\proj-venv\lib\site-packages\docutils\nodes.py", line 214, in walkabout
    if child.walkabout(visitor):
  File "c:\Users\username\Projects\proj-venv\lib\site-packages\docutils\nodes.py", line 214, in walkabout
    if child.walkabout(visitor):
  [Previous line repeated 2 more times]
  File "c:\Users\username\Projects\proj-venv\lib\site-packages\docutils\nodes.py", line 206, in walkabout
    visitor.dispatch_visit(self)
  File "c:\Users\username\Projects\proj-venv\lib\site-packages\docutils\nodes.py", line 1995, in dispatch_visit
    return method(node)
  File "c:\Users\username\Projects\proj-venv\lib\site-packages\sphinxcontrib\confluencebuilder\translator\__init__.py", line 132, in unknown_visit
    raise NotImplementedError('unknown node: ' + node_name)
NotImplementedError: unknown node: diagrams

How to Reproduce

Command executed to build and push to confluence: sphinx-build -E -a docs/source docs/build/confluence -b confluence

Contents of 'docs\source\requirements.txt'

recommonmark
sphinx
sphinx-diagrams
sphinx-rtd-theme
sphinxcontrib-confluencebuilder
sphinxcontrib-napoleon

Expected behavior

Builds and pushes the sphinx docs to confluence.

Your project

Confidential.

Screenshots

No response

OS

Windows 10

Python version

Python 3.9.4

Sphinx version

sphinx-build 4.2.0

Sphinx extensions

[ 'recommonmark', 'sphinx.ext.autodoc', 'sphinx.ext.extlinks', 'sphinx.ext.graphviz', 'sphinx.ext.inheritance_diagram', 'sphinx.ext.intersphinx', 'sphinx.ext.napoleon', 'sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx_diagrams', 'sphinx_rtd_theme', 'sphinxcontrib.confluencebuilder', ]

Extra tools

No response

Additional context

This is a confidential project I cannot share on GitHub etc.

astrojuanlu commented 2 years ago

My first guess is that sphinxcontrib-confluencebuilder is not compatible with Sphinx-diagrams. Worth opening an issue on https://github.com/sphinx-contrib/confluencebuilder/issues

AndreasLuckert commented 2 years ago

Just filed it here as well based on your recommendation.

jdknight commented 1 year ago

This was an issue specific to the sphinxcontrib-confluencebuilder and has since been addressed. In any case, this issue can be closed.