fig.show() result - Chrome displays Aw, Snap! error if Chrome is initially closed
Code snippet below causes error in my Google Chrome:
import plotly.graph_objects as go from plotly.subplots import make_subplots import plotly.io as pio
fig = make_subplots(specs=[[{"secondary_y": True}]]) fig.add_trace( go.Scatter(x=[1,2,3],y=[4,5,6]), row=1, col=1 ) fig.show()
Google Chrome displays the error below. Edge Firefox, IE all work correctly when they are set to the default browser.
Aw, Snap! Something went wrong while displaying this webpage Error code: STATUS_BAD_IMPERSONATION_LEVEL
Google Chrome 89.0.4389.72 (64bit) PyCharm 2020.3.3 Python 3.9 Plotly 4.14.3 Windows 10 Enterprise 10.0.19041 64bit
This only occurs when Google Chrome is not running. If Google Chrome is running, the plots work as expected.
Does anyone know the cause or have a workaround for this?
Thanks!
I can't get it to work on my Mac with chrome. It gives a broken pipe error soon as it tries to open a tab in chrome.
Exception occurred during processing of request from ('127.0.0.1', 65327)
BrokenPipeError: [Errno 32] Broken pipe
But if I force it to use firefox instead via the pio.renderers.default="firefox" it works fine. So maybe try Firefox for now?
Mine's probably not the same issue but still can't get it to work on chrome at all but firefox works just fine.
Might help (ran into lots of issues with Plotly + VS Code + Google Chrome over the last few months - this seems to have largely resolved it)
from plotly import offline
offline.plot(fig) # instead of fig.show()
https://stackoverflow.com/a/62215075/13697228
did this issue ever get resolved properly? I am experiencing the same problem using the latest version of Plotly (5.20.0)
the offline plot works fine, but it's a bit annoying not being able to just run things directly from vscode in a reliable manner.