Skip to content
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

4.5.0: sphinx fails on generate notebook man page #10304

Closed
kloczek opened this issue Mar 28, 2022 · 2 comments
Closed

4.5.0: sphinx fails on generate notebook man page #10304

kloczek opened this issue Mar 28, 2022 · 2 comments

Comments

@kloczek
Copy link

kloczek commented Mar 28, 2022

Describe the bug

Sphonx fails with call trace on generate notebook (6.4.10) man page.

+ /usr/bin/python3 setup.py build_sphinx -b man --build-dir build/sphinx
running build_sphinx
Running Sphinx v4.5.0
DEBUG:: sys.path
================
/home/tkloczko/rpmbuild/BUILD/notebook-6.4.10
/home/tkloczko/rpmbuild/BUILD/notebook-6.4.10
/usr/lib64/python38.zip
/usr/lib64/python3.8
/usr/lib64/python3.8/lib-dynload
/usr/lib64/python3.8/site-packages
/usr/lib/python3.8/site-packages
repo_root
=====================
/home/tkloczko/rpmbuild/BUILD/notebook-6.4.10
DEBUG:: Post insert to sys.path
===============================
/home/tkloczko/rpmbuild/BUILD/notebook-6.4.10
/home/tkloczko/rpmbuild/BUILD/notebook-6.4.10
/home/tkloczko/rpmbuild/BUILD/notebook-6.4.10
/usr/lib64/python38.zip
/usr/lib64/python3.8
/usr/lib64/python3.8/lib-dynload
/usr/lib64/python3.8/site-packages
/usr/lib/python3.8/site-packages
Initializing GitHub plugin
making output directory... done
loading intersphinx inventory from https://ipython.readthedocs.io/en/stable/objects.inv...
loading intersphinx inventory from https://nbconvert.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://nbformat.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://jupyter.readthedocs.io/en/latest/objects.inv...
intersphinx inventory has moved: https://jupyter.readthedocs.io/en/latest/objects.inv -> https://docs.jupyter.org/en/latest/objects.inv
[autosummary] generating autosummary for: changelog.md, comms.rst, config_overview.rst, contributing.rst, development_faq.rst, examples/Notebook/Connecting with the Qt Console.ipynb, examples/Notebook/Custom Keyboard Shortcuts.ipynb, examples/Notebook/Distributing Jupyter Extensions as Python Packages.ipynb, examples/Notebook/Importing Notebooks.ipynb, examples/Notebook/JavaScript Notebook Extensions.ipynb, ..., extending/index.rst, extending/keymaps.rst, extending/savehooks.rst, frontend_config.rst, index.rst, notebook.rst, public_server.rst, security.rst, troubleshooting.rst, ui_components.rst
myst v0.17.0: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=['html_image'], linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=False, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', disable_syntax=[], all_links_external=False, url_schemes=['http', 'https', 'mailto', 'ftp'], ref_domains=None, highlight_code_blocks=True, number_code_blocks=[], title_to_header=False, heading_anchors=None, heading_slug_func=None, html_meta=[], footnote_transition=True, substitutions=[], sub_delimiters=['{', '}'], words_per_minute=200)
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 32 added, 0 changed, 0 removed
reading sources... [100%] ui_components
/home/tkloczko/rpmbuild/BUILD/notebook-6.4.10/docs/source/index.rst:19: WARNING: toctree contains reference to nonexisting document 'config'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-jupyternotebook.3 { notebook ui_components examples/Notebook/examples_index examples/Notebook/What is the Jupyter Notebook examples/Notebook/Notebook Basics examples/Notebook/Running Code examples/Notebook/Working With Markdown Cells examples/Notebook/Custom Keyboard Shortcuts examples/Notebook/JavaScript Notebook Extensions examples/Notebook/Importing Notebooks examples/Notebook/Connecting with the Qt Console examples/Notebook/Typesetting Equations troubleshooting changelog comms config_overview frontend_config public_server security examples/Notebook/Distributing Jupyter Extensions as Python Packages extending/index extending/contents extending/savehooks extending/handlers extending/frontend_extensions extending/keymaps extending/bundler_extensions contributing development_faq examples/Notebook/nbpackage/mynotebook examples/Notebook/nbpackage/nbs/other } /home/tkloczko/rpmbuild/BUILD/notebook-6.4.10/docs/source/examples/Notebook/Running Code.ipynb:: WARNING: unknown node type: <CodeAreaNode: <literal_block...>>
failed

Exception occurred:
  File "/usr/lib/python3.8/site-packages/docutils/nodes.py", line 2056, in unknown_departure
    raise NotImplementedError(
NotImplementedError: <class 'sphinx.writers.manpage.ManualPageTranslator'> departing unknown node type: CodeAreaNode
The full traceback has been saved in /tmp/sphinx-err-qaw9tuo8.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!
[tkloczko@devel-g2v source]$ cat /tmp/sphinx-err-qaw9tuo8.log
# Sphinx version: 4.5.0
# Python version: 3.8.12 (CPython)
# Docutils version: 0.17.1 release
# Jinja2 version: 3.0.3
# Last messages:
#   extending/handlers
#   extending/frontend_extensions
#   extending/keymaps
#   extending/bundler_extensions
#   contributing
#   development_faq
#   examples/Notebook/nbpackage/mynotebook
#   examples/Notebook/nbpackage/nbs/other
#   }
#   failed
# Loaded extensions:
#   sphinx.ext.mathjax (4.5.0) from /usr/lib/python3.8/site-packages/sphinx/ext/mathjax.py
#   sphinxcontrib.applehelp (1.0.2) from /usr/lib/python3.8/site-packages/sphinxcontrib/applehelp/__init__.py
#   sphinxcontrib.devhelp (1.0.2) from /usr/lib/python3.8/site-packages/sphinxcontrib/devhelp/__init__.py
#   sphinxcontrib.htmlhelp (2.0.0) from /usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py
#   sphinxcontrib.serializinghtml (1.1.5) from /usr/lib/python3.8/site-packages/sphinxcontrib/serializinghtml/__init__.py
#   sphinxcontrib.qthelp (1.0.3) from /usr/lib/python3.8/site-packages/sphinxcontrib/qthelp/__init__.py
#   alabaster (0.7.12) from /usr/lib/python3.8/site-packages/alabaster/__init__.py
#   sphinx.ext.autodoc.preserve_defaults (1.0) from /usr/lib/python3.8/site-packages/sphinx/ext/autodoc/preserve_defaults.py
#   sphinx.ext.autodoc.type_comment (4.5.0) from /usr/lib/python3.8/site-packages/sphinx/ext/autodoc/type_comment.py
#   sphinx.ext.autodoc (4.5.0) from /usr/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py
#   sphinx.ext.doctest (4.5.0) from /usr/lib/python3.8/site-packages/sphinx/ext/doctest.py
#   sphinx.ext.intersphinx (4.5.0) from /usr/lib/python3.8/site-packages/sphinx/ext/intersphinx.py
#   sphinx.ext.autosummary (4.5.0) from /usr/lib/python3.8/site-packages/sphinx/ext/autosummary/__init__.py
#   IPython.sphinxext.ipython_console_highlighting (unknown version) from /usr/lib/python3.8/site-packages/IPython/sphinxext/ipython_console_highlighting.py
#   nbsphinx (0.8.8) from /usr/lib/python3.8/site-packages/nbsphinx.py
#   sphinxcontrib_github_alt (unknown version) from /usr/lib/python3.8/site-packages/sphinxcontrib_github_alt.py
#   myst_parser (0.17.0) from /usr/lib/python3.8/site-packages/myst_parser/__init__.py
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/sphinx/setup_command.py", line 167, in run
    app.build(force_all=self.all_files)
  File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 330, in build
    self.builder.build_update()
  File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 283, in build_update
    self.build(['__all__'], to_build)
  File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 350, in build
    self.write(docnames, list(updated_docnames), method)
  File "/usr/lib/python3.8/site-packages/sphinx/util/__init__.py", line 540, in wrapper
    return f(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/sphinx/builders/manpage.py", line 93, in write
    docwriter.write(largetree, destination)
  File "/usr/lib/python3.8/site-packages/docutils/writers/__init__.py", line 78, in write
    self.translate()
  File "/usr/lib/python3.8/site-packages/sphinx/writers/manpage.py", line 31, in translate
    self.document.walkabout(visitor)
  File "/usr/lib/python3.8/site-packages/docutils/nodes.py", line 227, in walkabout
    if child.walkabout(visitor):
  File "/usr/lib/python3.8/site-packages/docutils/nodes.py", line 227, in walkabout
    if child.walkabout(visitor):
  File "/usr/lib/python3.8/site-packages/docutils/nodes.py", line 227, in walkabout
    if child.walkabout(visitor):
  [Previous line repeated 7 more times]
  File "/usr/lib/python3.8/site-packages/docutils/nodes.py", line 240, in walkabout
    visitor.dispatch_departure(self)
  File "/usr/lib/python3.8/site-packages/sphinx/util/docutils.py", line 536, in dispatch_departure
    super().dispatch_departure(node)
  File "/usr/lib/python3.8/site-packages/docutils/nodes.py", line 2034, in dispatch_departure
    return method(node)
  File "/usr/lib/python3.8/site-packages/docutils/nodes.py", line 2056, in unknown_departure
    raise NotImplementedError(
NotImplementedError: <class 'sphinx.writers.manpage.ManualPageTranslator'> departing unknown node type: CodeAreaNode

How to Reproduce

$ git clone https://github.com/jupyter/notebook/
$ cd notebook
$ pip install -r docs/doc-requirements.txt
$ /usr/bin/python3 setup.py build_sphinx -b man

Expected behavior

sphinx should not fail.

Your project

https://github.com/jupyter/notebook/

Screenshots

No response

OS

Linux/x86_64

Python version

3.8.12

Sphinx version

4.5.0

Sphinx extensions

nbsphinx, sphinxcontrib-github-alt

Extra tools

No response

Additional context

No response

@kloczek kloczek changed the title 4.5.0: sphoinx fails on generate notebook man page 4.5.0: sphinx fails on generate notebook man page Mar 28, 2022
@tk0miya
Copy link
Member

tk0miya commented Mar 30, 2022

In #9432, you reported similar error around nbsphinx extension. Was it resolved at that time? Please ask this to nbsphinx project first.
Thanks,

@kloczek
Copy link
Author

kloczek commented Apr 20, 2022

I've opened spatialaudio/nbsphinx#643

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants