Skip to content
New issue

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

LPCLOUD HLS status code 400 #153

Closed
RichardScottOZ opened this issue Apr 25, 2021 · 5 comments
Closed

LPCLOUD HLS status code 400 #153

RichardScottOZ opened this issue Apr 25, 2021 · 5 comments

Comments

@RichardScottOZ
Copy link

Yesterday at one stage I was getting the above error

stac_items = Search(url='https://cmr.earthdata.nasa.gov/stac/LPCLOUD',
                 collections=['HLSL30.v1.5'], 
                 #bbox = '-53.0172669999999968,-9.5331669999999988,-48.4956669999999974,-3.1035670000000000' ,
                 bbox = '-53.0232820986343754,-8.1236837545427090, -49.4688521093868800,-4.8677173521785928',
                 datetime='2016-04-23/2021-04-23', 
                ).items()

 File "stackstac_NASA_HLS_cropped.py", line 119, in <module>
    stac_items = Search(url='https://cmr.earthdata.nasa.gov/stac/LPCLOUD',
  File "C:\Users\rscott\AppData\Local\Continuum\anaconda3\envs\stackstac\lib\site-packages\satsearch\search.py", line 90, in items
    found = self.found(headers=headers)
  File "C:\Users\rscott\AppData\Local\Continuum\anaconda3\envs\stackstac\lib\site-packages\satsearch\search.py", line 62, in found
    results = self.query(url=url, headers=headers, **kwargs)
  File "C:\Users\rscott\AppData\Local\Continuum\anaconda3\envs\stackstac\lib\site-packages\satsearch\search.py", line 80, in query
    raise SatSearchError(response.text)
satsearch.search.SatSearchError: "Request failed with status code 400"

and then it worked, then it stopped working again.

Some sort of rate limiting or something along those lines perhaps?

@matthewhanson
Copy link
Contributor

@RichardScottOZ I've encountered these errors occasionally as well, and this could be due to some inefficiencies in CMR queries. Will look more into it, thanks.

@matthewhanson
Copy link
Contributor

BTW @RichardScottOZ, there's a replacement for sat-search now - https://github.com/stac-utils/pystac-client that currently replicates most everything sat-search does, with more functionality coming in the next few months.

@RichardScottOZ
Copy link
Author

Thanks will give that a try shortly.

@matthewhanson
Copy link
Contributor

I believe this issue should be fixed, by limiting the max items returned per page, and also internally reducing the number of calls to CMR.

Please open up a new issue if you find there is still an issue here.

@RichardScottOZ
Copy link
Author

Thanks Matthew, hopefully give this a shot in the next few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants