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

Extension "sphinx.ext.todo" and epub: NotImplementedError #13177

Open
Murmele opened this issue Dec 11, 2024 · 1 comment
Open

Extension "sphinx.ext.todo" and epub: NotImplementedError #13177

Murmele opened this issue Dec 11, 2024 · 1 comment
Labels
awaiting:response Waiting for a response from the author of this issue type:bug

Comments

@Murmele
Copy link

Murmele commented Dec 11, 2024

Describe the bug

Trying to build epub files

How to Reproduce

Steps to reproduce:

  1. Create sphinx project with sphinx.ext.todo extension
  2. Add a todo to the file .. todo:: add a description
  3. Build: sphinx-build -M epub "source" "build" -v -E

Observed

NotImplementedError: <class 'sphinx.writers.html5.HTML5Translator'> departing unknown node type: todo_node

Environment Information

[tool.poetry]
name = "sphinx_debug"
version = "0.1.0"
description = ""
authors = ["Author"]

[tool.poetry.dependencies]
python = "^3.11"
sphinx = "^8.1.3"
sphinx-rtd-theme = "^3.0.2"
sphinxcontrib-youtube = "^1.4.1"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

Sphinx extensions

["sphinx.ext.todo"]

Additional context

# Platform:         win32; (Windows-10-10.0.22621-SP0)
# Sphinx version:   6.2.1
# Python version:   3.10.10 (CPython)
# Docutils version: 0.18.1
# Jinja2 version:   3.1.2
# Pygments version: 2.15.1

# Last messages:
#   done
#   preparing documents...
#   done
#   writing output... [  1%] 2D_plotting
#   writing output... [  3%] 2D_plotting/2D_plotting_boxplot
#   writing output... [  5%] 2D_plotting/2D_plotting_histogram
#   writing output... [  7%] 2D_plotting/2D_plotting_xycurve
#   writing output... [  9%] 2D_plotting/2D_plotting_xycurve_formula
#   writing output... [ 11%] 404
#   writing output... [ 12%] computational_notebooks

# Loaded extensions:
#   sphinx.ext.mathjax (6.2.1)
#   alabaster (0.7.13)
#   sphinxcontrib.applehelp (1.0.4)
#   sphinxcontrib.devhelp (1.0.2)
#   sphinxcontrib.htmlhelp (2.0.1)
#   sphinxcontrib.serializinghtml (1.1.5)
#   sphinxcontrib.qthelp (1.0.3)
#   sphinxcontrib.jquery (4.1)
#   sphinx_rtd_theme (unknown version)
#   sphinxcontrib.youtube (1.4.1)
#   sphinx.ext.todo (6.2.1)

# Traceback:
Traceback (most recent call last):
  File "C:\Users\<USER>\AppData\Local\Programs\Python\Python310\lib\site-packages\sphinx\cmd\build.py", line 285, in build_main
    app.build(args.force_all, args.filenames)
  File "C:\Users\<USER>\AppData\Local\Programs\Python\Python310\lib\site-packages\sphinx\application.py", line 353, in build
    self.builder.build_update()
  File "C:\Users\<USER>\AppData\Local\Programs\Python\Python310\lib\site-packages\sphinx\builders\__init__.py", line 311, in build_update
    self.build(to_build,
  File "C:\Users\<USER>\AppData\Local\Programs\Python\Python310\lib\site-packages\sphinx\builders\__init__.py", line 378, in build
    self.write(docnames, list(updated_docnames), method)
  File "C:\Users\<USER>\AppData\Local\Programs\Python\Python310\lib\site-packages\sphinx\builders\__init__.py", line 586, in write
    self._write_serial(sorted(docnames))
  File "C:\Users\<USER>\AppData\Local\Programs\Python\Python310\lib\site-packages\sphinx\builders\__init__.py", line 596, in _write_serial
    self.write_doc(docname, doctree)
  File "C:\Users\<USER>\AppData\Local\Programs\Python\Python310\lib\site-packages\sphinx\builders\_epub_base.py", line 371, in write_doc
    super().write_doc(docname, doctree)
  File "C:\Users\<USER>\AppData\Local\Programs\Python\Python310\lib\site-packages\sphinx\builders\html\__init__.py", line 666, in write_doc
    self.docwriter.write(doctree, destination)
  File "C:\Users\<USER>\AppData\Local\Programs\Python\Python310\lib\site-packages\docutils\writers\__init__.py", line 78, in write
    self.translate()
  File "C:\Users\<USER>\AppData\Local\Programs\Python\Python310\lib\site-packages\sphinx\writers\html.py", line 37, in translate
    self.document.walkabout(visitor)
  File "C:\Users\<USER>\AppData\Local\Programs\Python\Python310\lib\site-packages\docutils\nodes.py", line 199, in walkabout
    if child.walkabout(visitor):
  File "C:\Users\<USER>\AppData\Local\Programs\Python\Python310\lib\site-packages\docutils\nodes.py", line 199, in walkabout
    if child.walkabout(visitor):
  File "C:\Users\<USER>\AppData\Local\Programs\Python\Python310\lib\site-packages\docutils\nodes.py", line 199, in walkabout
    if child.walkabout(visitor):
  File "C:\Users\<USER>\AppData\Local\Programs\Python\Python310\lib\site-packages\docutils\nodes.py", line 212, in walkabout
    visitor.dispatch_departure(self)
  File "C:\Users\<USER>\AppData\Local\Programs\Python\Python310\lib\site-packages\sphinx\util\docutils.py", line 601, in dispatch_departure
    super().dispatch_departure(node)
  File "C:\Users\<USER>\AppData\Local\Programs\Python\Python310\lib\site-packages\docutils\nodes.py", line 2046, in dispatch_departure
    return method(node)
  File "C:\Users\<USER>\AppData\Local\Programs\Python\Python310\lib\site-packages\docutils\nodes.py", line 2068, in unknown_departure
    raise NotImplementedError(
NotImplementedError: <class 'sphinx.writers.html5.HTML5Translator'> departing unknown node type: todo_node
kdesysadmin pushed a commit to KDE/documentation-docs-labplot-org that referenced this issue Dec 11, 2024
Reason: Because right now it fails and only html is working. Once issue sphinx-doc/sphinx#13177 is fixed, it can be reverted
kdesysadmin pushed a commit to KDE/documentation-docs-labplot-org that referenced this issue Dec 11, 2024
Reason: Because right now it fails and only html is working. Once issue sphinx-doc/sphinx#13177 is fixed, it can be reverted
@picnixz
Copy link
Member

picnixz commented Dec 14, 2024

I cannot reproduce the issue with the latest Sphinx. Can you try with the latest version please? thanks in advance.

@picnixz picnixz added the awaiting:response Waiting for a response from the author of this issue label Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting:response Waiting for a response from the author of this issue type:bug
Projects
None yet
Development

No branches or pull requests

2 participants