question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

helpers.scan not working (v7.0.3)

See original GitHub issue

Hi I’m using Python 3.6.8 Since the last elasticsearch update I got an error with the scan method (with pyelasticsearch version 7.0.3).

image

The problem is that it is not scrolling.

In the previous version 7.0.2 it works perfectly.

Thank you in advance 😃

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
honzakralcommented, Aug 22, 2019

Thank you for your patience, I realized the problem is that you are using an old version of the code which got accidentally released in the wheel version of package. I just release 7.0.4 which corrects the mistake. My apologies!

0reactions
fernapercommented, Aug 22, 2019

I just did it, and this is the response:

python version: 3.6.8
elasticsearch-py version: (7, 0, 3)
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:9200
DEBUG:urllib3.connectionpool:http://localhost:9200 "GET /_all/_search?scroll=2m&size=10 HTTP/1.1" 200 4221
INFO:elasticsearch:GET http://localhost:9200/_all/_search?scroll=2m&size=10 [status:200 request:0.006s]
DEBUG:elasticsearch:> {"query":{"match_all":{}},"sort":"_doc"}
DEBUG:elasticsearch:< {"_scroll_id":"DnF1ZXJ5VGhlbkZldGNoGAAAAAAAAAUwFjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFLhY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABUIWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAVFFjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFLxY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABTEWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAUyFjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFMxY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABTUWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAU0Fjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFNxY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABTYWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAU_Fjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFOBY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABTkWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAU7Fjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFOhY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABUMWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAU8Fjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFPRY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABT4WODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAVEFjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFQBY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABUEWODFuX095d2pRcW1Od1VmUGNteGFCQQ==","took":2,"timed_out":false,"_shards":{"total":24,"successful":24,"skipped":0,"failed":0},"hits":{"total":{"value":13595081,"relation":"eq"},"max_score":null,"hits":[<10 first hits there>]}}
DEBUG:urllib3.connectionpool:http://localhost:9200 "GET /_search/scroll?scroll=2m HTTP/1.1" 400 672
WARNING:elasticsearch:GET http://localhost:9200/_search/scroll?scroll=2m [status:400 request:0.001s]
DEBUG:elasticsearch:> DnF1ZXJ5VGhlbkZldGNoGAAAAAAAAAUwFjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFLhY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABUIWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAVFFjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFLxY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABTEWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAUyFjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFMxY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABTUWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAU0Fjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFNxY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABTYWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAU_Fjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFOBY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABTkWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAU7Fjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFOhY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABUMWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAU8Fjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFPRY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABT4WODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAVEFjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFQBY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABUEWODFuX095d2pRcW1Od1VmUGNteGFCQQ==
DEBUG:elasticsearch:< {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Failed to parse request body"}],"type":"illegal_argument_exception","reason":"Failed to parse request body","caused_by":{"type":"json_parse_exception","reason":"Unrecognized token 'DnF1ZXJ5VGhlbkZldGNoGAAAAAAAAAUwFjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFLhY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABUIWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAVFFjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFLxY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABTEWODFuX095d2pRcW1O...': was expecting ('true', 'false' or 'null')\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@414b042a; line: 1, column: 257]"}},"status":400}
DEBUG:urllib3.connectionpool:http://localhost:9200 "DELETE /_search/scroll HTTP/1.1" 200 33
INFO:elasticsearch:DELETE http://localhost:9200/_search/scroll [status:200 request:0.001s]
DEBUG:elasticsearch:> {"scroll_id":["DnF1ZXJ5VGhlbkZldGNoGAAAAAAAAAUwFjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFLhY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABUIWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAVFFjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFLxY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABTEWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAUyFjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFMxY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABTUWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAU0Fjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFNxY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABTYWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAU_Fjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFOBY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABTkWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAU7Fjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFOhY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABUMWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAU8Fjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFPRY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABT4WODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAVEFjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFQBY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABUEWODFuX095d2pRcW1Od1VmUGNteGFCQQ=="]}
DEBUG:elasticsearch:< {"succeeded":true,"num_freed":24}
Exception: {'error': {'root_cause': [{'type': 'illegal_argument_exception', 'reason': 'Failed to parse request body'}], 'type': 'illegal_argument_exception', 'reason': 'Failed to parse request body', 'caused_by': {'type': 'json_parse_exception', 'reason': "Unrecognized token 'DnF1ZXJ5VGhlbkZldGNoGAAAAAAAAAUwFjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFLhY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABUIWODFuX095d2pRcW1Od1VmUGNteGFCQQAAAAAAAAVFFjgxbl9PeXdqUXFtTndVZlBjbXhhQkEAAAAAAAAFLxY4MW5fT3l3alFxbU53VWZQY214YUJBAAAAAAAABTEWODFuX095d2pRcW1O...': was expecting ('true', 'false' or 'null')\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@414b042a; line: 1, column: 257]"}}, 'status': 400}

NOTE: I removed the 10 first hits from the output

Read more comments on GitHub >

github_iconTop Results From Across the Web

Helpers — Elasticsearch 7.16.0 documentation
By default scan does not return results in any pre-determined order. To have a standard order in the returned documents (either by score...
Read more >
VMware ESXi 7.0 Update 3f Release Notes
Patches Contained in this Release; Resolved Issues; Known Issues; Known Issues from Previous Releases. IMPORTANT: If your source system contains ...
Read more >
ElasticSearch, size parameter doesn't work for helpers.scan ...
I just want to get 50000 records. but the truth is that I get the whole index(more than 1 million records). result =...
Read more >
Nmap Change Log
List of the most recent changes to the free Nmap Security Scanner.
Read more >
Bug listing with status RESOLVED with resolution FIXED as at ...
... Bug:224 - "gdm does not work" status:RESOLVED resolution:FIXED severity:critical ... Bug:422 - "freesci-0.3.3.ebuild (New package)" status:RESOLVED ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found