-
Notifications
You must be signed in to change notification settings - Fork 52
Closed
Labels
P2needed for current cycleneeded for current cycleTNGrelated to next-generation architecturerelated to next-generation architectureactivebugsomething brokensomething broken
Description
A user reports, "I tried to run [the test program] in a container using python:3.12-alpine and python:3.12-slim-bookworm images. I installed chromium (apk add —no-cache chromium; apt update && apt install chromium). I get an error regarding "Close() was called before the browser finished opening”".
Test program:
import plotly.express as px
fig = px.scatter(px.data.iris(), x="sepal_length", y="sepal_width", color="species")
fig.write_image("figure.png", engine="kaleido")
Error message:
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/choreographer/browser.py", line 225, in _open_async
raise BrowserFailedError("The browser seemed to close immediately after starting. Perhaps adding debug_browser=True will help.") from e
choreographer.browser.BrowserFailedError: The browser seemed to close immediately after starting. Perhaps adding debug_browser=True will help.
Traceback (most recent call last):
File "//test.py", line 3, in <module>
fig.write_image("figure.png", engine="kaleido")
File "/usr/local/lib/python3.12/site-packages/plotly/basedatatypes.py", line 3835, in write_image
return pio.write_image(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/plotly/io/_kaleido.py", line 266, in write_image
img_data = to_image(
^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/plotly/io/_kaleido.py", line 143, in to_image
img_bytes = scope.transform(
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/kaleido/scopes/plotly.py", line 197, in transform
img = kaleido.to_image_block(spec, Path(self._tempfile.name).absolute(), self._topojson, self._mapbox_access_token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/kaleido/__init__.py", line 27, in to_image_block
return asyncio.run(to_image(spec, f, topojson, mapbox_token))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/kaleido/__init__.py", line 30, in to_image
async with Browser(headless=True) as browser:
choreographer.browser.BrowserFailedError: Close() was called before the browser finished opening- maybe it crashed?
dtdoctor output attacheddtdoctor.txt
Metadata
Metadata
Assignees
Labels
P2needed for current cycleneeded for current cycleTNGrelated to next-generation architecturerelated to next-generation architectureactivebugsomething brokensomething broken