Skip to content

ValueError: 'theorem ' is not in list #76

Open
@andrewcstewart

Description

@andrewcstewart

Describe the bug

context
While trying to run the simple examples described at https://jupyterbook.org/content/proof.html, I receive an error (for all types).

expectation
I expected jb to render the sphinx-proof directive.

bug
But instead I receive a ValueError:

$ jupyter-book build mybook

Exception occurred:
  File "/workspace/.pip-modules/lib/python3.8/site-packages/sphinx_proof/nodes.py", line 38, in depart_enumerable_node
    idx = self.body.index(f"{typ} {number} ")
ValueError: 'theorem  ' is not in list
The full traceback has been saved in /tmp/sphinx-err-i514zz9f.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!
Traceback (most recent call last):
  File "/workspace/.pip-modules/lib/python3.8/site-packages/jupyter_book/sphinx.py", line 167, in build_sphinx
    app.build(force_all, filenames)
  File "/workspace/.pip-modules/lib/python3.8/site-packages/sphinx/application.py", line 337, in build
    self.builder.build_update()
  File "/workspace/.pip-modules/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 294, in build_update
    self.build(to_build,
  File "/workspace/.pip-modules/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 358, in build
    self.write(docnames, list(updated_docnames), method)
  File "/workspace/.pip-modules/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 532, in write
    self._write_serial(sorted(docnames))
  File "/workspace/.pip-modules/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 542, in _write_serial
    self.write_doc(docname, doctree)
  File "/workspace/.pip-modules/lib/python3.8/site-packages/sphinx/builders/html/__init__.py", line 626, in write_doc
    self.docwriter.write(doctree, destination)
  File "/workspace/.pip-modules/lib/python3.8/site-packages/docutils/writers/__init__.py", line 78, in write
    self.translate()
  File "/workspace/.pip-modules/lib/python3.8/site-packages/sphinx/writers/html.py", line 71, in translate
    self.document.walkabout(visitor)
  File "/workspace/.pip-modules/lib/python3.8/site-packages/docutils/nodes.py", line 227, in walkabout
    if child.walkabout(visitor):
  File "/workspace/.pip-modules/lib/python3.8/site-packages/docutils/nodes.py", line 227, in walkabout
    if child.walkabout(visitor):
  File "/workspace/.pip-modules/lib/python3.8/site-packages/docutils/nodes.py", line 240, in walkabout
    visitor.dispatch_departure(self)
  File "/workspace/.pip-modules/lib/python3.8/site-packages/sphinx/util/docutils.py", line 517, in dispatch_departure
    method(node)
  File "/workspace/.pip-modules/lib/python3.8/site-packages/sphinx_proof/nodes.py", line 38, in depart_enumerable_node
    idx = self.body.index(f"{typ} {number} ")
ValueError: 'theorem  ' is not in list

Reproduce the bug

  1. Go to https://jupyterbook.org/content/proof.html
  2. Follow the examples.
  3. Attempt to build jb book.

List your environment

$ jb --version
Jupyter Book      : 0.12.1
External ToC      : 0.2.3
MyST-Parser       : 0.15.2
MyST-NB           : 0.13.1
Sphinx Book Theme : 0.1.10
Jupyter-Cache     : 0.4.3
NbClient          : 0.5.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions