Skip to content

DOC Jupyterlite raises a ValueError when using plotly #31399

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

Closed
ArturoAmorQ opened this issue May 20, 2025 · 1 comment · Fixed by #31400
Closed

DOC Jupyterlite raises a ValueError when using plotly #31399

ArturoAmorQ opened this issue May 20, 2025 · 1 comment · Fixed by #31400

Comments

@ArturoAmorQ
Copy link
Member

Describe the issue linked to the documentation

Running for instance plot_forest_hist_grad_boosting_comparison in jupyterlite raises a ValueError: Mime type rendering requires nbformat>=4.2.0 but it is not installed. I tried adding %pip install nbformat at the top of the notebook cell but that doesn't seem to work. As per this post in stackoverflow, downgrading nbformat to 5.1.2 solved this issue for me.

Suggest a potential alternative/fix

Add a magic function %pip install nbformat==5.1.2 whenever plotly is imported.

@lesteve
Copy link
Member

lesteve commented May 20, 2025

I opened #31400 with a potential fix.

For further reference link to the JupyterLite example

In the last cell the figure does show up but there is an error:
Image

@lesteve lesteve removed the Needs Triage Issue requires triage label May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants