Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update image export error message with PDF format #3255

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions altair/utils/mimebundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,16 +225,10 @@ def _validate_normalize_engine(engine, format):
elif altair_saver is not None:
normalized_engine = "altairsaver"
else:
if format == "pdf":
raise ValueError(
"Saving charts in {fmt!r} format requires the altair_saver package: "
"see http://github.com/altair-viz/altair_saver/".format(fmt=format)
)
else:
raise ValueError(
"Saving charts in {fmt!r} format requires the vl-convert-python or altair_saver package: "
"see http://github.com/altair-viz/altair_saver/".format(fmt=format)
)
raise ValueError(
"Saving charts in {fmt!r} format requires the vl-convert-python or altair_saver package: "
"see http://github.com/altair-viz/altair_saver/".format(fmt=format)
)
else:
raise ValueError(
"Invalid conversion engine {engine!r}. Expected one of {valid!r}".format(
Expand Down