Skip to content

jupyter nbconvert fails to include Plotly plots (UserWarning: Your element with mimetype(s) dict_keys(['application/vnd.plotly.v1+json']) is not able to be represented) #5365

@mwouts

Description

@mwouts

When I run jupyter nbconvert --execute --to html notebook.ipynb on a notebook with this content:

import plotly.graph_objects as go

go.Figure(data=[go.Scatter(x=[1, 2, 3], y=[4, 5, 6])])

then I get an HTML file with no plot. Also, the command displays the following warning:

UserWarning: Your element with mimetype(s) dict_keys(['application/vnd.plotly.v1+json']) is not able to be represented.

This started happening after I transitioned to Plotly 6 (I am now using latest Plotly 6.3.1 and latest nbconvert==7.16.6).

I have noticed that a fix is to replace the jupyter nbconvert command with PLOTLY_RENDERER=notebook jupyter nbconvert ..., but I was wondering if you would have a different recommendation maybe? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions