plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

Plotly 6.0.1 not showing the first plot in vscode

Open Luffbee opened this issue 9 months ago • 2 comments

The first plot is not showing in vscode interactive window, using the "notebook_connected" renderer. I'm using the following code (note the # %% is used to enable vscode interactive window):

# %%
import plotly.express as px
import plotly.io as pio

pio.renderers.default = "notebook_connected"
px.line(x=list(range(10)), y=list(range(10, 20))).show()

# %%
px.line(x=list(range(10)), y=list(range(10, 20))).show()

# %%
px.line(x=list(range(10)), y=list(range(10, 20))).show()

And the result:

Image

I toggled the dev tool and found a suspicious network error as the following, note the failed request does not have the ".js" suffix.

Image

Additionally, I tried exporting it to HTML (I'm testing the problem in #5068 ), and the HTML works fine, all plots are showing.

Luffbee avatar Mar 18 '25 04:03 Luffbee

@marthacryan I don't expect this will be solved by your extension but may be related (?)

gvwilson avatar Mar 19 '25 18:03 gvwilson

#5109 may have identified the cause

gvwilson avatar Mar 24 '25 15:03 gvwilson

Hi! I'm not reproducing this in plotly==6.1.2, could you try this out again with that version?

marthacryan avatar Jun 18 '25 17:06 marthacryan

Hi! I'm not reproducing this in plotly==6.1.2, could you try this out again with that version?

I cannot reproduce the problem either. I think it has been fixed. I will close this issue.

Luffbee avatar Jul 12 '25 15:07 Luffbee