Description
Plotly version 6.0.0 fails to output figure with WebGL content.
I create a 3D figure composed of Mesh3D and Scatter3D objects. The figure is shown using:
import plotly.graph_objs as go
import plotly.offline as py
# ...
fig = go.Figure(data=mesh_data, layout=lyt)
py.iplot(fig)
The figure displays fine - also in v 6.0.0 but when exporting to HTML, the resulting html file just has a blank space where the figure should be. It works as expected in 5.24.1 where the interactive graphics is present in the output html file.
When I display the web page and look a the source control, I see this error:

Note that this is using MacOS and Safari, but it appears irrelevant whether I use Python 3.11 or 3.13. It also does not seem to matter whether I export from VS Code or Jupyter notebook. I am using plotly in teaching and became aware of the problem since students reported it on other platforms, so I am fairly confident it is an issue with Plotly.py - specifically plotly.offline. The workaround is, of course, to downgrade to 5.24.1.
Thanks!
Activity
arnaudh commentedon Feb 6, 2025
Also bumping into this issue. Here is the error in text form, to make it easy for others to find this issue:
We run into this on MacOS and linux. We export to HTML using
papermill
nbformat
andnbconvert
like so:afeld commentedon Mar 17, 2025
Figured this out: There was a bug in plotly.js 3.0.0 (plotly/plotly.js#7367), which was fixed in v3.0.1. Looks like plotly.py is upgrading plotly.js in 6.0.1, so hopefully that's released soon 🎉
afeld commentedon Mar 17, 2025
Installed from the
v6.0.1
tag and confirmed that solved thekP.select
(which isd3.select
, unminified) issue 🚀python/ Pin plotly<6 until plotly/plotly.py#5012 is fixed.
afeld commentedon Mar 18, 2025
6.0.1 was released, I think this can now be closed!
gvwilson commentedon Mar 18, 2025
reported fixed in 6.0.1