You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
context jupyter-book build ./ --builder linkcheck results in AttributeError: 'CheckExternalLinksBuilder' object has no attribute 'current_docname'
expectation
I expect an error message that indicates version incompatibility in some way (though maybe there is nothing JupyterBook can do here and it's really the responsibility of the sphinx extension that seems to lead to this error).
bug
This appears to arise from the sphinx-exercise extension that is incompatible with sphinx>6 but does not pin the dependency and a fresh install of jupyterbook=1 installs sphinx=7 executablebooks/sphinx-exercise#64 (comment)
Traceback (most recent call last):
File "/Users/scott/miniforge3/envs/xarray-tutorial/lib/python3.12/site-packages/sphinx_exercise/post_transforms.py", line 189, in run
node = resolve_solution_title(self.app, node, target_node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/scott/miniforge3/envs/xarray-tutorial/lib/python3.12/site-packages/sphinx_exercise/post_transforms.py", line 143, in resolve_solution_title
updated_title_text =""+ exercise_title.children[0].astext()
~~~~~~~~~~~~~~~~~~~~~~~^^^IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/scott/miniforge3/envs/xarray-tutorial/lib/python3.12/site-packages/jupyter_book/sphinx.py", line 167, in build_sphinx
app.build(force_all, filenames)
File "/Users/scott/miniforge3/envs/xarray-tutorial/lib/python3.12/site-packages/sphinx/application.py", line 355, in buildself.builder.build_update()
File "/Users/scott/miniforge3/envs/xarray-tutorial/lib/python3.12/site-packages/sphinx/builders/__init__.py", line 293, in build_updateself.build(to_build,
File "/Users/scott/miniforge3/envs/xarray-tutorial/lib/python3.12/site-packages/sphinx/builders/__init__.py", line 363, in buildself.write(docnames, list(updated_docnames), method)
File "/Users/scott/miniforge3/envs/xarray-tutorial/lib/python3.12/site-packages/sphinx/builders/__init__.py", line 571, in writeself._write_serial(sorted(docnames))
File "/Users/scott/miniforge3/envs/xarray-tutorial/lib/python3.12/site-packages/sphinx/builders/__init__.py", line 578, in _write_serial
doctree =self.env.get_and_resolve_doctree(docname, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/scott/miniforge3/envs/xarray-tutorial/lib/python3.12/site-packages/sphinx/environment/__init__.py", line 635, in get_and_resolve_doctreeself.apply_post_transforms(doctree, docname)
File "/Users/scott/miniforge3/envs/xarray-tutorial/lib/python3.12/site-packages/sphinx/environment/__init__.py", line 688, in apply_post_transforms
transformer.apply_transforms()
File "/Users/scott/miniforge3/envs/xarray-tutorial/lib/python3.12/site-packages/sphinx/transforms/__init__.py", line 83, in apply_transformssuper().apply_transforms()
File "/Users/scott/miniforge3/envs/xarray-tutorial/lib/python3.12/site-packages/docutils/transforms/__init__.py", line 182, in apply_transforms
transform.apply(**kwargs)
File "/Users/scott/miniforge3/envs/xarray-tutorial/lib/python3.12/site-packages/sphinx/transforms/post_transforms/__init__.py", line 41, in applyself.run(**kwargs)
File "/Users/scott/miniforge3/envs/xarray-tutorial/lib/python3.12/site-packages/sphinx_exercise/post_transforms.py", line 196, in run
docname =self.app.builder.current_docname
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AttributeError: 'CheckExternalLinksBuilder' object has no attribute 'current_docname'
workaround
pinning sphinx<7 resolves the error, but maybe there is a simple fix to allow for the most recent version?...
Describe the bug
context
jupyter-book build ./ --builder linkcheck
results in AttributeError: 'CheckExternalLinksBuilder' object has no attribute 'current_docname'expectation
I expect an error message that indicates version incompatibility in some way (though maybe there is nothing JupyterBook can do here and it's really the responsibility of the sphinx extension that seems to lead to this error).
bug
This appears to arise from the sphinx-exercise extension that is incompatible with sphinx>6 but does not pin the dependency and a fresh install of jupyterbook=1 installs sphinx=7 executablebooks/sphinx-exercise#64 (comment)
workaround
pinning sphinx<7 resolves the error, but maybe there is a simple fix to allow for the most recent version?...
Reproduce the bug
Using the following in the _config.yml :
jupyter-book build ./ --builder linkcheck
List your environment
The text was updated successfully, but these errors were encountered: