Skip to content
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

Theme error - build failing #1412

Closed
sr-murthy opened this issue Aug 17, 2023 · 4 comments
Closed

Theme error - build failing #1412

sr-murthy opened this issue Aug 17, 2023 · 4 comments

Comments

@sr-murthy
Copy link

I have a (Gitlab) CI pipeline set up for a project where one of the stages builds Sphinx docs (currently, Sphinx version 7.2 in the Gitlab runner) on the branch for any given commit (the Sphinx Makefile build target is called). Usually this never fails, until recently when I started seeing this:

...
Theme error:
An error happened in rendering the page index.
Reason: AttributeError("'TocTree' object has no attribute 'get_toctree_ancestors'")
...

I'm using the Pydata theme (defined in conf.py), and the index.rst ToC directive, which hasn't changed, is below:

.. toctree::
   :maxdepth: 2
   :caption: Contents:

I note the recent version change in Sphinx. I've never seen this before with earlier versions of Sphinx, e.g. 7.0.2, 7.1.2 etc.

I'm not sure if it is Sphinx, or Pydata. Can someone please look at this?

@sr-murthy sr-murthy changed the title Sphinx build is failing - possible theme error Theme error - build failing Aug 17, 2023
@sr-murthy
Copy link
Author

sr-murthy commented Aug 17, 2023

I changed the Sphinx version in the runner to 7.1.2 and the error went away. I'm wondering if there are changes in 7.2 that afffect the way that the ToC tree renders.

@sr-murthy
Copy link
Author

sr-murthy commented Aug 17, 2023

So looks like a Sphinx issue after all

sphinx-doc/sphinx#11604

but there is a note there suggesting there could be a Pydata fix. Temporarily fix is to switch back to an earlier version of Sphinx.

@drammock
Copy link
Collaborator

The fix is already merged into main of the theme, but we haven't had a chance to cut a new release yet. Pinning to Sphinx<7.2 is the right fix for now. Unfortunately this Sphinx issue came up at the last minute before their release, and we have a couple of blocking issues that prevent us from an immediate release of the theme.

@AA-Turner
Copy link
Contributor

This ought to be fixed in Sphinx 7.2.1.

A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants