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

No graphs displayed in Github Pages #23

Open
Rchatru opened this issue May 8, 2023 · 2 comments
Open

No graphs displayed in Github Pages #23

Rchatru opened this issue May 8, 2023 · 2 comments

Comments

@Rchatru
Copy link

Rchatru commented May 8, 2023

I have the documentation hosted on Github Pages, and I could display the graphics correctly, until I decided to update Sphinx and the pydata-sphinx-theme.

Before the update I had the following versions:
Sphinx 6.1.3
pydata-sphinx-theme 0.12.0
sphinx-design 0.3.0
myst-parser 0.18.1

After upgrading to the latest version of Sphinx and pydata, the following versions resulted:
Sphinx 7.0.0
pydata-sphinx-theme 0.13.3
sphinx-design 0.4.1
myst-parser 1.0.0

There are some other libraries that were also updated (I don't remember which ones), but they were not directly related to Sphinx.

I've tried downgrading to the original versions of the mentioned packages, but I can't get the graphics to work again. I don't know what else to try, any ideas on what might be causing the problem? The chart area shows "loading" indefinitely.

image

@Rchatru
Copy link
Author

Rchatru commented May 8, 2023

Update:

In developer tools you can find an error, I guess it could be related to the first one. I don't know if it can be useful.

image

image

@Rchatru
Copy link
Author

Rchatru commented May 9, 2023

Finally, I isolated the problem. Graphics stop displaying when moving from Sphinx version 5.3.0 to 6.0.0. And looking at changelog you can see:

#7405: Removed the jQuery and underscore.js JavaScript frameworks.
These frameworks are no longer be automatically injected into themes from Sphinx 6.0. If you develop a theme or extension that uses the jQuery, $, or $u global objects, you need to update your JavaScript to modern standards, or use the mitigation below.

So, the solution is to update the extension, or use the easy "mitigation" provided by the Sphinx team, (although they propose other solutions, I recommend checking the changelog).

pip install sphinxcontrib-jquery

# conf.py

extensions = [
    "sphinxcontrib.jquery",
]
...

The problem is fixed for me, but users using newer versions of Sphinx should encounter the same problem. I would recommend adding a note in the readme, so that it is taken into account before closing this issue.

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

1 participant