# CancelException with AsyncBulkLoad (Python helper)

**URL:** <https://discuss.elastic.co/t/cancelexception-with-asyncbulkload-python-helper/337038>\
**Category:** Elasticsearch\
**Created:** [June 28, 2023, 5:58am UTC](https://discuss.elastic.co/t/cancelexception-with-asyncbulkload-python-helper/337038 "2023-06-28T05:58:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ionFreeman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ionfreeman/32/122785_2.png) [@ionFreeman](https://discuss.elastic.co/u/ionFreeman)\
**Post date:** [June 28, 2023, 5:58am UTC](https://discuss.elastic.co/t/cancelexception-with-asyncbulkload-python-helper/337038/1 "2023-06-28T05:58:19Z")

</div>

Hello! I have a little action generator, actually a bunch of coroutines I stich together with aiostream.merge(). I pass it into the AsyncBulkLoad. I haven't reproduced the behavior when I have a small number of test actions, but when I do a real load, it blows up with a CancelException.

My current theory is that the aiostream Streamer throws this exception at the end of its iteration, scotching the load of the last few hundred actions.

Does that sound credible? I do call async\_bulk\_load in the Streamer's context.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 26, 2023, 5:59am UTC](https://discuss.elastic.co/t/cancelexception-with-asyncbulkload-python-helper/337038/2 "2023-07-26T05:59:03Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
