We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Setting a limit keyword arg has unexpected results:
import satsearch URL='https://earth-search.aws.element84.com/v0' results = satsearch.Search.search(url=URL, collections=['sentinel-s2-l2a-cogs'], bbox=[-54, 67.65, -50, 69.37], datetime='2019-08-15/2020-08-15', limit=200, ) print(f'{len(results.items())} S2 Items')
There are more items found (2158) than the limit (200) provided. 500 S2 Items
( I expect to have 200 items returned)
700
There are more items found (2158) than the limit (700) provided. 1000 S2 Items
--------------------------------------------------------------------------- SatSearchError Traceback (most recent call last) <ipython-input-4-6c0f70cd4c07> in <module> 7 limit=2500, 8 ) ----> 9 print(f'{len(results.items())} S2 Items') ~/miniconda3/envs/intake-stac-gui/lib/python3.7/site-packages/satsearch/search.py in items(self, limit, page_limit, headers) 88 def items(self, limit=10000, page_limit=500, headers=None): 89 """ Return all of the Items and Collections for this search """ ---> 90 found = self.found(headers=headers) 91 limit = self.limit or limit 92 if found > limit: ~/miniconda3/envs/intake-stac-gui/lib/python3.7/site-packages/satsearch/search.py in found(self, headers) 60 url = urljoin(self.url, 'search') 61 ---> 62 results = self.query(url=url, headers=headers, **kwargs) 63 # TODO - check for status_code 64 logger.debug(f"Found: {json.dumps(results)}") ~/miniconda3/envs/intake-stac-gui/lib/python3.7/site-packages/satsearch/search.py in query(self, url, headers, **kwargs) 78 # API error 79 if response.status_code != 200: ---> 80 raise SatSearchError(response.text) 81 return response.json() 82 SatSearchError: {"message": "Internal server error"}
This PR seems related #107 (Hi @acannistra!)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Setting a limit keyword arg has unexpected results:
( I expect to have 200 items returned)
700
in the above codeblock surprising leads to:This PR seems related #107 (Hi @acannistra!)
The text was updated successfully, but these errors were encountered: