Skip to content

Commit

Permalink
improve error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mattijn committed Feb 18, 2023
1 parent 17f51f9 commit e0cda9e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions altair/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,12 @@ def import_pyarrow_interchange():
return pi
except pkg_resources.DistributionNotFound:
# The package is not installed
raise ImportError("The package 'pyarrow' is required, but not installed")
raise ImportError(
"Usage of the DataFrame Interchange Protocol requires the package 'pyarrow', but it is not installed."
)
except pkg_resources.VersionConflict:
# The package is installed but does not meet the minimum version requirement
raise ImportError(
"The installed version of 'pyarrow' does not meet "
"the minimum requirement of version 11.0.0."
"The installed version of 'pyarrow' does not meet the minimum requirement of version 11.0.0. "
"Please update 'pyarrow' to use the DataFrame Interchange Protocol."
)

0 comments on commit e0cda9e

Please sign in to comment.