There was an error while loading. Please reload this page.
1 parent 8f20566 commit 8ae5708Copy full SHA for 8ae5708
1 file changed
plotly/io/_base_renderers.py
@@ -830,11 +830,11 @@ def render(self, fig_dict):
830
_ = write_html(fig_dict, file=filename_html, include_plotlyjs="cdn")
831
try:
832
write_image(figure, filename_png)
833
- except (ValueError, ImportError):
834
- raise ImportError(
+ except (ValueError, ImportError, RuntimeError) as e:
+ raise RuntimeError(
835
"kaleido and psutil are required to use the `sphinx_gallery_png` renderer. "
836
"See https://plotly.com/python/static-image-export/ for instructions on "
837
"how to install kaleido. Alternatively, you can use the `sphinx_gallery` "
838
"renderer (note that png thumbnails can only be generated with "
839
"the `sphinx_gallery_png` renderer)."
840
- )
+ ) from e
0 commit comments