microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.29k stars 291 forks source link

Using Plotly in the jupyter extension of VScode insider 1.53.0 results in No renderer could be found for MIME type: application/vnd.plotly.v1+json #4296

Closed hugocool closed 3 years ago

hugocool commented 3 years ago

VSCode Version: 1.53.0 - insiders OS Version: mac os catalina 10.15.6 (19G73) Jupyter Extension version: v2020.12.414227025 Python Extension version: v2021.1.442908725-dev Python and/or Anaconda version: 3.8 Type of virtual environment used: virtualenv Jupyter server running: Local

Plots when using Plotly in the jupyter notebook do not show.

Expected behaviour

The plot should just show when using plotly

Actual behaviour:

I get an error: No renderer could be found for MIME type: application/vnd.plotly.v1+json

this happens regardless of which plotly renderer is used and so also with the vscode renderer (to which the renderer is set by default).

Steps to Reproduce:

  1. open jupyter extension
  2. !pip install plotly import plotly.express as px px.line()

error: No renderer could be found for MIME type: application/vnd.plotly.v1+json

This also happens with older versions of plotly (I tested 4.14, 4.11, 4.10) Using other plotly renderers either results in the same error or no working output (except for the browser renderer which opens a new browser screen and shows the plot there).

IanMatthewHuff commented 3 years ago

@hugocool currently support for plotly is not working with the new insiders preview notebooks. See #4227.

We should be adding support this very soon. Just track issue #3936