# Python elasticsearch client "Validation Failed: 1: scrollId is missing;"

**URL:** <https://discuss.elastic.co/t/python-elasticsearch-client-validation-failed-1-scrollid-is-missing/136155>\
**Category:** Elasticsearch\
**Created:** [June 16, 2018, 12:09am UTC](https://discuss.elastic.co/t/python-elasticsearch-client-validation-failed-1-scrollid-is-missing/136155 "2018-06-16T00:09:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![niceyeti](https://avatars.discourse-cdn.com/v4/letter/n/9f8e36/32.png) [@niceyeti](https://discuss.elastic.co/u/niceyeti)\
**Post date:** [June 16, 2018, 12:09am UTC](https://discuss.elastic.co/t/python-elasticsearch-client-validation-failed-1-scrollid-is-missing/136155/1 "2018-06-16T00:09:22Z")

</div>

I'm using elasticsearch 5.6.4 and py-elasticsearch client (5,5,2) but the client methods are failing to scroll large result sets (~20k documents). When scan()+scroll() are called, or likewise helpers.scan(), the first results are returned, but once the client begins to scroll, the elastic server returns 'Validation Failed: 1: scrollId is missing'. Using wireshark I can confirm that the client methods are sending a 'scroll\_id' parameter and value, and to the correct \_search/scroll endpoint, per the REST api scroll pattern. Likewise, scrolling works using the Kibana console (queries are below), so I can confirm that it _can_ work.

Can anyone spot why the python client calls fail to scroll documents? I am new to elasticsearch, but searched far and wide for a way to detect what's causing these failures, but I'm stumped. Thank you!

Code snippet and output are here: [https://gist.github.com/niceyeti/c8c9f64b27450d5a9c5d27233beb2c00](https://gist.github.com/niceyeti/c8c9f64b27450d5a9c5d27233beb2c00)

These queries work successfully in the Kibana Console, and demonstrate the simple scroll pattern desired of the python client:  
(1) GET INDEX\_NAME/\_search/?scroll=5m  
{  
"query": {  
"match\_all": {}  
}  
}

Then using the @scroll\_id param from the returned results:  
(2) GET \_search/scroll  
{  
"scroll": "5m",  
"scroll\_id": "asdf123..."  
}

---

<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 14, 2018, 12:09am UTC](https://discuss.elastic.co/t/python-elasticsearch-client-validation-failed-1-scrollid-is-missing/136155/2 "2018-07-14T00:09:26Z")

</div>

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