elasticsearch-py icon indicating copy to clipboard operation
elasticsearch-py copied to clipboard

Make BulkIndexError and ScanError serializable

Open seagrine opened this issue 1 year ago • 2 comments

I encountered an issue with pickling/unpickling BulkindexError.

unpickle_exception\n inst = func(*args)\n ^^^^^^^^^^^\nTypeError: BulkIndexError.**init**() missing 1 required positional argument: 'errors

I'm adding an implementation of __reduce__ to this (and ScanError) so they can be pickled and unpickled correctly. Added tests for it as well.

seagrine avatar Oct 17 '24 17:10 seagrine