You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Displaying a PlotlyJS.SyncPlot in a recent IJulia notebook produces no plot. The underlying error is:
ArgumentError: Cannot serialize Plot{...} to JSON
Because this exception occurs after IJulia starts sending an execute_result multipart ZMQ message, the visible server-side error is instead:
ValueError: Invalid Signature: b"error"
Minimal reproduction
using PlotlyJS
x =0:0.01:1
y =sin.(x)
plot(x, y, label="y", linewidth=2)
The SyncPlot itself is constructed successfully, and its WebIO JSON and HTML representations can be generated with repr. The failure happens when IJulia serializes the dictionary returned by the PlotlyJS IJulia extension.
Root cause
ext/IJuliaExt.jl currently contains:
"application/vnd.plotly.v1+json"=> JSON.lower(p)
For p::PlotlyJS.SyncPlot, JSON.lower(p) unwraps only one level and returns the internal PlotlyBase.Plot. Recent IJulia serializes the complete message with IJulia.JSONX, which cannot serialize that Plot object.
The full underlying stack trace ends in:
ArgumentError: Cannot serialize Plot{...} to JSON
at IJulia.JSONX.write_json
at IJulia.send_ipython
at IJulia.execute_request
Verified workaround
Changing the Plotly MIME entry to fully lower the underlying plot resolves the failure:
Why hasn't anyone replied to @Avandar2024? Who is supposed to approve the creation of a PR, now? It hasn't been possible to display a figure for quite some time now. I'm interested in 3d figures, who effectively block both PlotlyJS.plot and PlotlyBase.Plot.
Activity
empet commentedon Oct 18, 2026
Why hasn't anyone replied to @Avandar2024? Who is supposed to approve the creation of a PR, now? It hasn't been possible to display a figure for quite some time now. I'm interested in 3d figures, who effectively block both
PlotlyJS.plotandPlotlyBase.Plot.