-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Project fails to build with Sphinx 7.0.0 (jinja2.exceptions.UndefinedError: 'style' is undefined) #10279
Comments
I do, generally, hate doing "+1" posts but I did want to say that I'm seeing exactly the same issue now: https://readthedocs.org/projects/qtile/builds/20338846/ |
Hi! Do your projects build locally (outside Read the Docs) using Sphinx 7.0.0? |
Thanks for the reply. I get the same error when running locally. This is the end of the output when running
|
My project builds correctly with Sphinx 7.0.0 when using the default Sphinx theme. Trying to install the RTD theme downgrades Sphinx to 6.2.1. After forcing an install of 7.0.0 (with the error below), the RTD theme seems to be building correctly on my machine.
|
Ah. The issue for us seems to be the sphinx-rtd theme. It looks like it was using a very old version. Forcing it to use the latest makes the build succeed locally. Will try pushing and see if it also builds remotely. |
I can build locally with sphinx 7.0.0 and sphinx-rtd 1.2.0 but the build fails on the remote site because of the dependency conflict mentioned above: EDIT: unsurprisingly, pinning the remote build to |
OK, I see. It seems that Read the Docs Sphinx's theme is not compatible with Sphinx 7.x: https://github.com/readthedocs/sphinx_rtd_theme/blob/master/setup.cfg#L48 I'd suggest to pin |
RTD theam is not compatible with Sphinx 7.0+ readthedocs/readthedocs.org#10279 Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
RTD theam is not compatible with Sphinx 7.0+ readthedocs/readthedocs.org#10279 Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
RTD theam is not compatible with Sphinx 7.0+ readthedocs/readthedocs.org#10279 Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
RTD theam is not compatible with Sphinx 7.0+ readthedocs/readthedocs.org#10279 Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
RTD theam is not compatible with Sphinx 7.0+ readthedocs/readthedocs.org#10279 Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
RTD theam is not compatible with Sphinx 7.0+ readthedocs/readthedocs.org#10279 Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
I'm still seeing a pip error, despite
.readthedocs.yaml
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
# Build from the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
fail_on_warning: true
# Explicitly set the version of Python and its requirements
python:
install:
- requirements: docs/requirements.txt
requirements.txt
|
@BeyondEvil your
That way it will take into consideration the constraints of the RTD Sphinx theme as well, which requires |
Thanks! I had added |
….org#10279 for details. Revert "Try upgrading sphinx to the latest version." This reverts commit b665138.
`sphinx-rtd-theme` is not compatible with `sphinx7`, see readthedocs/readthedocs.org#10279
pinning to sphinx version <7 as recommended in readthedocs/readthedocs.org#10279
Seems sphinx-rtd-theme 1.* is incompatible with Sphinx 7. Could also be that sphinx-rtd-theme version was not constrained and an older version was being used by default in Read the Docs. See readthedocs/readthedocs.org#10279
- Otherwise, the sphinx-rtd-theme and sphinx >= 7 clash due to a missing 'style' variable definition in the theme templates, see also readthedocs/readthedocs.org#10279
The main contribution of this PR is to update the Python API reference docs with the new classes added in the recent schema change (`TomogramAuthor` and `AnnotationFile`). In addition, there are few other documentation related changes. 1\. Updated quick start to reflect other API changes (e.g. removing `binning` keyword argument from `download_mrcfile`). 2\. Added the upgrade option to the napari plugin, so that its dependencies (like the Python client in this repo) are upgraded when there is an existing installation. 3\. Fixed the examples in the base model so that they work with the current schema. 4\. Fixed some typos and small mistakes in the model docstrings. 5\. Enforced a version of Sphinx pre v7 to prevent an error when building the HTML docs. The error is `Reason: UndefinedError("'style' is undefined")` and is likely related to the Sphinx RTD theme not supporting Sphinx v7. The [corresponding issue](readthedocs/readthedocs.org#10279) should be fixed for v2 of the theme, but I did not find that to be the case.
Details
Expected Result
A successful build
Actual Result
The build failed:
Our last successful build was 1.5 days ago, and it was built using Sphinx v6.2.1. The failed build is using Sphinx v7.0.0. (There were no doc changes between the two commits.)
The text was updated successfully, but these errors were encountered: