admin管理员组

文章数量:1122846

I started getting the following error ("started" as in "it appeared without me changing any package or other setup aspect"):

File ~/venv/telematics_py311/lib/python3.11/site-packages/plotly/io/_base_renderers.py:688, in open_html_in_browser(html, using, new, autoraise)
    685             pass
    687     if browser is None:
--> 688         raise ValueError("Can't locate a browser with key in " + str(using))
    690 class OneShotRequestHandler(BaseHTTPRequestHandler):
    691     def do_GET(self):

ValueError: Can't locate a browser with key in ('chrome', 'google-chrome')

when showing a Plotly figure inside a Jupyter lab notebook. The figure itself is showing OK, but this error appears before the figure. Unfortunately I can't create a minimal example to recreate the problem - when I create a similar figure in a new notebook, there is no error. After creating a figure using fig = go.Figure(), I use the methods fig.add_layout_image, fig.add_shape, fig.add_scatter, and fig.add_annotation. My setup is a Windows pc with Python 3.11, Jupyterlab 4.3.1, Plotly 5.24.1, and the brwoser is Chrome 131.0.6778.71.

本文标签: python 3xRendering error with Plotly and JupyterlabStack Overflow