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
{{ message }}
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
After upgrading to sphinx==7.2.4 (from 7.1.2) I'm getting an error when trying to generate docs for a COMPAS extension using the theme.
Error is:
Theme error:
An error happened in rendering the page api.
Reason: UndefinedError("'theme_maxdepth' is undefined")
Full trace:
writing output... [ 1%] api
[app] emitting event: 'doctree-resolved'(<document: <section "api reference"...>>, 'api')
[app] emitting event: 'html-page-context'('api', 'page.html', {'embedded': False, 'project': 'COMPAS TIMBER', 'release': '0.2.16', 'version':
[app] emitting event: 'build-finished'(ThemeError('An error happened in rendering the page api.\nReason: UndefinedError("\'theme_maxdepth\
Traceback (most recent call last):
File "C:\Users\ckasirer\.conda\envs\timber\lib\site-packages\sphinx\builders\html\__init__.py", line 1121, in handle_page
output = self.templates.render(templatename, ctx)
File "C:\Users\ckasirer\.conda\envs\timber\lib\site-packages\sphinx\jinja2glue.py", line 200, in render
return self.environment.get_template(template).render(context)
File "C:\Users\ckasirer\.conda\envs\timber\lib\site-packages\jinja2\environment.py", line 1301, in render
self.environment.handle_exception()
File "C:\Users\ckasirer\.conda\envs\timber\lib\site-packages\jinja2\environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "C:\Users\ckasirer\.conda\envs\timber\lib\site-packages\sphinx\themes\basic\page.html", line 10, in top-level template code
{%- extends "layout.html" %}
File "C:\Users\ckasirer\.conda\envs\timber\lib\site-packages\sphinx_compas_theme\compaspkg\layout.html", line 134, in top-level template code
{% set toctree = toctree(maxdepth=theme_maxdepth, titles_only=True, collapse=False, includehidden=True) %}
File "C:\Users\ckasirer\.conda\envs\timber\lib\site-packages\jinja2\sandbox.py", line 393, in call
return __context.call(__obj, *args, **kwargs)
File "C:\Users\ckasirer\.conda\envs\timber\lib\site-packages\sphinx\builders\html\__init__.py", line 1048, in <lambda>
ctx['toctree'] = lambda **kwargs: self._get_local_toctree(pagename, **kwargs)
File "C:\Users\ckasirer\.conda\envs\timber\lib\site-packages\sphinx\builders\html\__init__.py", line 946, in _get_local_toctree
toctree = global_toctree_for_doc(self.env, docname, self, collapse=collapse, **kwargs)
File "C:\Users\ckasirer\.conda\envs\timber\lib\site-packages\sphinx\environment\adapters\toctree.py", line 86, in global_toctree_for_doc
maxdepth=int(maxdepth),
jinja2.exceptions.UndefinedError: 'theme_maxdepth' is undefined
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\ckasirer\.conda\envs\timber\lib\site-packages\sphinx\cmd\build.py", line 298, in build_main
app.build(args.force_all, args.filenames)
File "C:\Users\ckasirer\.conda\envs\timber\lib\site-packages\sphinx\application.py", line 355, in build
self.builder.build_update()
File "C:\Users\ckasirer\.conda\envs\timber\lib\site-packages\sphinx\builders\__init__.py", line 293, in build_update
self.build(to_build,
File "C:\Users\ckasirer\.conda\envs\timber\lib\site-packages\sphinx\builders\__init__.py", line 363, in build
self.write(docnames, list(updated_docnames), method)
File "C:\Users\ckasirer\.conda\envs\timber\lib\site-packages\sphinx\builders\__init__.py", line 571, in write
self._write_serial(sorted(docnames))
File "C:\Users\ckasirer\.conda\envs\timber\lib\site-packages\sphinx\builders\__init__.py", line 581, in _write_serial
self.write_doc(docname, doctree)
File "C:\Users\ckasirer\.conda\envs\timber\lib\site-packages\sphinx\builders\html\__init__.py", line 655, in write_doc
self.handle_page(docname, ctx, event_arg=doctree)
File "C:\Users\ckasirer\.conda\envs\timber\lib\site-packages\sphinx\builders\html\__init__.py", line 1128, in handle_page
raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") %
sphinx.errors.ThemeError: An error happened in rendering the page api.
Reason: UndefinedError("'theme_maxdepth' is undefined")
Describe the bug
After upgrading to
sphinx==7.2.4
(from7.1.2
) I'm getting an error when trying to generate docs for a COMPAS extension using the theme.Error is:
Full trace:
To Reproduce
Steps to reproduce the behavior:
api.rst
sphinx==7.2.4
invoke docs
Expected behavior
Docs generated successfully.
Desktop (please complete the following information):
Additional context
There's been some breaking changes in the API starting sphinx
7.2
maybe related to: sphinx-doc/sphinx#11608
The text was updated successfully, but these errors were encountered: