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

ARROW-247 Fix BulkWriteError import error #234

Merged
merged 1 commit into from
Sep 23, 2024
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
3 changes: 1 addition & 2 deletions bindings/python/pymongoarrow/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
from pyarrow import Schema as ArrowSchema
from pyarrow import Table, timestamp
from pyarrow.types import is_date32, is_date64
from pymongo.bulk import BulkWriteError
from pymongo.common import MAX_WRITE_BATCH_SIZE

from pymongoarrow.context import PyMongoArrowContext
Expand Down Expand Up @@ -495,7 +494,7 @@ def write(collection, tabular, *, exclude_none: bool = False):
i += 1
try:
collection.insert_many(cur_batch)
except BulkWriteError as bwe:
except pymongo.errors.BulkWriteError as bwe:
raise ArrowWriteError(_transform_bwe(dict(bwe.details), cur_offset)) from bwe
except pymongo.errors.PyMongoError as pme:
raise ArrowWriteError(
Expand Down
Loading