Closed duncanmmacleod closed 2 years ago
There are a couple possibilities:
You are switching from a different theme or much older version of the theme and re-using an old build directory. In that case just delete the old build directory or use a fresh one.
Something else, most likely some other extension related to search. In that case, you can potentially produce a reduced example with "binary search" --- make a copy of the project, and successively delete pages and extensions until the problem goes away (and be sure to use a fresh build each time).
@jbms, thanks for taking the time to speculate without much to go on. I'll have a play around and report back if I make progress.
- You are switching from a different theme or much older version of the theme and re-using an old build directory. In that case just delete the old build directory or use a fresh one.
I believe this is the case, completely removing any old build directories does the trick. It is interesting (maybe) that the -E
(don't use a saved environment) flag for sphinx doesn't help with this at all.
Thanks.
I have the same error, just deleting the delete old build directory as said @jbms and rebuild the html version and fixed it the error.
I'm using sphinx-immaterial for a fairly complicated docs build and end up with this exception right at the end of the build:
This is with sphinx-immaterial 0.8.1 and the versions in the 'Full traceback' below.
I'm not really sure how to attempt to provide a simplified reproducer, sorry for that. Am happy to dig in and provide any more information as required to understand if there is a bug and how to reproduce it trivially.
Full traceback
```pytb # Sphinx version: 4.5.0 # Python version: 3.8.13 (CPython) # Docutils version: 0.17.1 release # Jinja2 version: 3.1.2 # Last messages: # reading sources... [100%] timeseries/statevector # # looking for now-outdated files... # none found # pickling environment... # done # checking consistency... # done # preparing documents... # failed # Loaded extensions: # sphinx.ext.mathjax (4.5.0) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/ext/mathjax.py # sphinxcontrib.applehelp (1.0.2) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinxcontrib/applehelp/__init__.py # sphinxcontrib.devhelp (1.0.2) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinxcontrib/devhelp/__init__.py # sphinxcontrib.htmlhelp (2.0.0) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py # sphinxcontrib.serializinghtml (1.1.5) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinxcontrib/serializinghtml/__init__.py # sphinxcontrib.qthelp (1.0.3) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinxcontrib/qthelp/__init__.py # alabaster (0.7.12) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/alabaster/__init__.py # sphinx.ext.autodoc.preserve_defaults (1.0) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/ext/autodoc/preserve_defaults.py # sphinx.ext.autodoc.type_comment (4.5.0) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/ext/autodoc/type_comment.py # sphinx.ext.autodoc (4.5.0) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py # sphinx.ext.doctest (4.5.0) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/ext/doctest.py # sphinx.ext.intersphinx (4.5.0) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/ext/intersphinx.py # sphinx.ext.todo (4.5.0) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/ext/todo.py # sphinx.ext.coverage (4.5.0) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/ext/coverage.py # sphinx.ext.imgmath (4.5.0) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/ext/imgmath.py # sphinx.ext.autosummary (4.5.0) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/ext/autosummary/__init__.py # sphinx.ext.graphviz (4.5.0) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/ext/graphviz.py # sphinx.ext.inheritance_diagram (4.5.0) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/ext/inheritance_diagram.py # sphinx.ext.linkcode (4.5.0) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/ext/linkcode.py # sphinx.ext.ifconfig (4.5.0) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/ext/ifconfig.py # sphinx_automodapi.autodoc_enhancements (unknown version) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_automodapi/autodoc_enhancements.py # sphinx_automodapi.automodsumm (unknown version) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_automodapi/automodsumm.py # sphinx_automodapi.automodapi (unknown version) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_automodapi/automodapi.py # sphinx_panels (0.6.0) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_panels/__init__.py # sphinxcontrib.programoutput (unknown version) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinxcontrib/programoutput/__init__.py # numpydoc (1.4.0) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/numpydoc/__init__.py # matplotlib.sphinxext.plot_directive (3.5.2) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/matplotlib/sphinxext/plot_directive.py # gwpy.utils.sphinx.epydoc (unknown version) from /home/duncan.macleod/gwpy-nightly-build/gwpy/gwpy/utils/sphinx/epydoc.py # sphinx_immaterial.apidoc_formatting (unknown version) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_immaterial/apidoc_formatting.py # sphinx_immaterial.python_domain_fixes (unknown version) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_immaterial/python_domain_fixes.py # sphinx_immaterial.python_type_annotation_transforms (unknown version) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_immaterial/python_type_annotation_transforms.py # sphinx_immaterial.cpp_domain_fixes (unknown version) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_immaterial/cpp_domain_fixes.py # sphinx_immaterial.nav_adapt (unknown version) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_immaterial/nav_adapt.py # sphinx_immaterial.postprocess_html (unknown version) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_immaterial/postprocess_html.py # sphinx_immaterial.inlinesyntaxhighlight (unknown version) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_immaterial/inlinesyntaxhighlight.py # sphinx_immaterial.object_toc (unknown version) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_immaterial/object_toc.py # sphinx_immaterial.search_adapt (unknown version) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_immaterial/search_adapt.py # sphinx_immaterial.generic_synopses (unknown version) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_immaterial/generic_synopses.py # sphinx_immaterial.md_admonition (0.0.1) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_immaterial/md_admonition.py # sphinx_immaterial.content_tabs (unknown version) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_immaterial/content_tabs.py # sphinx_immaterial.mermaid_diagrams (unknown version) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_immaterial/mermaid_diagrams.py # sphinx_immaterial.task_lists (unknown version) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_immaterial/task_lists.py # sphinx_immaterial (unknown version) from /home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_immaterial/__init__.py Traceback (most recent call last): File "/home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/cmd/build.py", line 276, in build_main app.build(args.force_all, filenames) File "/home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/application.py", line 330, in build self.builder.build_update() File "/home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 286, in build_update self.build(to_build, File "/home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 350, in build self.write(docnames, list(updated_docnames), method) File "/home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 516, in write self.prepare_writing(docnames) File "/home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/builders/html/__init__.py", line 431, in prepare_writing self.load_indexer(docnames) File "/home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx/builders/html/__init__.py", line 890, in load_indexer self.indexer.load(ft, self.indexer_format) File "/home/duncan.macleod/.conda/envs/gwpy-nightly-3.8/lib/python3.8/site-packages/sphinx_immaterial/search_adapt.py", line 159, in load docurls = frozen["docurls"] KeyError: 'docurls' ```