plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

Mime type rendering requires nbformat>=4.2.0 but it is not installed

Open JingZhang918 opened this issue 4 years ago • 15 comments

Hey guys, please help me! I've tried what I can. But I still got error. Help!!!

WX20210703-153948@2x

JingZhang918 avatar Jul 03 '21 13:07 JingZhang918

I have same problem while running in vscode 1.58

stipid avatar Jul 11 '21 04:07 stipid

Yes, you need to install the required version.

nicolaskruchten avatar Jul 11 '21 10:07 nicolaskruchten

+1 https://stackoverflow.com/questions/69304838/plotly-cannot-find-nbformat

uriva avatar Sep 23 '21 17:09 uriva

+1 me 2, it ocuppied used vscode 1.63.2, anaconda python 1.8.2

KaneOne avatar Jan 08 '22 06:01 KaneOne

+1 win10 python 3.9 vscode 1.74.3

Karlheinzniebuhr avatar Jan 30 '23 22:01 Karlheinzniebuhr

I have the same problem, does anyone know the solution for it?

helioprado avatar Feb 06 '23 16:02 helioprado

Yes, you need to install nbformat with the required version.

nicolaskruchten avatar Feb 06 '23 16:02 nicolaskruchten

I had the same problem. Posted the solution here: https://stackoverflow.com/a/75436915/3595697

Crypticat avatar Feb 13 '23 14:02 Crypticat

I had some problem, I try this solution then clear output and run manually again. it's works for me. https://stackoverflow.com/questions/66557543/valueerror-mime-type-rendering-requires-nbformat-4-2-0-but-it-is-not-installed

yussyafridayusfi avatar Apr 30 '23 09:04 yussyafridayusfi

I had some problem, I try this solution then clear output and run manually again. it's works for me. https://stackoverflow.com/questions/66557543/valueerror-mime-type-rendering-requires-nbformat-4-2-0-but-it-is-not-installed

This also works for me. Remember to restart the kernel :)

shuoyang2000 avatar Jun 14 '23 18:06 shuoyang2000

i just restarted the kernel and it helped.

ketipotova avatar Aug 03 '23 11:08 ketipotova

I went to cmd as administrator and put pip install nbformat and it worked

Grazys avatar Sep 27 '23 00:09 Grazys

Or, if you need to upgrade de nbformat, you need to put pip install --upgrade nbformat

Grazys avatar Sep 27 '23 00:09 Grazys

I installed nbformat and that fixed the error in the original post, but ran into a subsequent problem.

Running

import plotly.io as pio
pio.renderers.default = "notebook_connected+pdf"

I got AttributeError: module 'isoduration' has no attribute 'DurationParsingException'. Full trace:

Screenshot 2023-10-26 at 9 47 09 AM copy

That error was misleading, as isoduration wasn't installed. Fixed by installing isoduration, which is apparently a transitive dependency of nbformat->jsonschema. It's still unclear to me where that need is coming from. I'm also having trouble reproducing when creating an environment from scratch. Sharing in case any else runs into the same issue.

afeld avatar Oct 26 '23 15:10 afeld

Restart your vscode or juypyter notebook

moresanket4003 avatar Jun 26 '24 05:06 moresanket4003

Hi - we are tidying up stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. If you'd like to submit a PR, we'd be happy to prioritize a review, and if it's a request for tech support, please post in our community forum. Thank you - @gvwilson

gvwilson avatar Jul 11 '24 13:07 gvwilson