Skip to content

Plotly plots are no longer displayed since plotly 6.1.0 #850

@johannes-mueller

Description

@johannes-mueller

Problem

For plotly versions >6.1.0 (probably by this PR plotly plots are no longer displayed in html files generated from jupyter notebooks with npsphinx. Using jupyter-nbconvert produces correctly working html files.

Debating on whether the culprit is nbsphinx or plotly I came to the conclusion that due to the fact that the error message is obviously produced by nbsphinx, probably there is a fix needed here.

What happens is, that plotly plots are rendered out byt a warning box

Data type cannot be displayed: application/vnd.plotly.v1+json

See a rendered example here

The error message is most probably from here

Googling the error message reveals that the problem is not uncommon and as it seems it mostly goes unnoticed.

Proposal

Two things should be considered

  • Fix the issue itself and render the plots properly
  • Turn the warning into an error. Most docs are built by a CI/CD and are not proofread in detail by a human at least not every time it newly builts. So there must be an option to make the docs built fail as soon as the above mentioned warning is issued.

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