Skip to content

Commit

Permalink
Display kaleido installation instructions when neither kaleido nor or…
Browse files Browse the repository at this point in the history
…ca are installed
  • Loading branch information
jonmmease committed Feb 27, 2021
1 parent 03979d1 commit 92b8954
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/python/plotly/plotly/io/_kaleido.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,19 @@ def to_image(
# -------------
if engine == "auto":
if scope is not None:
# Default to kaleido if available
engine = "kaleido"
else:
engine = "orca"
# See if orca is available
from ._orca import validate_executable

try:
validate_executable()
engine = "orca"
except:
# If orca not configured properly, make sure we display the error
# message advising the installation of kaleido
engine = "kaleido"

if engine == "orca":
# Fall back to legacy orca image export path
Expand Down

0 comments on commit 92b8954

Please sign in to comment.