plotly / Kaleido

Fast static image export for web-based visualization libraries with zero dependencies
Other
348 stars 33 forks source link

[Python] Display error stream when interrupting the program #160

Closed Lucas-C closed 1 year ago

Lucas-C commented 1 year ago

Hi,

I am currently facing a case of Kaleido hanging forever, from Python code calling plotly.graph_objects.Figure.to_image(format="png", engine="kaleido"). I hope that this PR may be the solution I need: https://github.com/plotly/Kaleido/pull/149

In the meantime, adding those 3 lines allowed me access to the executable/bin/kaleido stderr when interrupting the whole program using CTRL+C:

Error stream:
[0308/083633.564952:ERROR:platform_shared_memory_region_posix.cc(47)] Descriptor access mode (0) differs from expected (2)
[0308/083633.565438:FATAL:platform_shared_memory_region_posix.cc(100)] Check failed: CheckPlatformHandlePermissionsCorrespondToMode(handle.get(), mode, size).
...

For this reason, it seems to me a useful an innocuous patch.