-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicit errors message when arrow version mismatch (#80)
- Loading branch information
1 parent
fcc96b2
commit eee04d3
Showing
4 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
# Importing pyarrow is necessary to load the runtime libraries | ||
import pyarrow | ||
import pyarrow.parquet | ||
from .palletjack_cython import * | ||
|
||
from .package_metadata import ( | ||
__version__, | ||
__dependencies__ | ||
) | ||
|
||
try: | ||
from .palletjack_cython import * | ||
except ImportError as e: | ||
if any(x in str(e) for x in ['arrow', 'parquet']): | ||
pyarrow_req = next((r for r in __dependencies__ if r.startswith('pyarrow')), '') | ||
raise ImportError(f"This version of {__package__}={__version__} is built against {pyarrow_req}, please ensure you have it installed. Current pyarrow version is {pyarrow.__version__}. ({str(e)})") from None | ||
else: | ||
raise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters