HLS STAC "Oops!" error occurring every day around 2 pm pacific time.
Posted: Tue Oct 29, 2024 12:36 pm America/New_York
We noticed that the HLS “Oops!” error* seems to occur at roughly the same time every day, so we created a script which checks the status of HLS throughout the day. Indeed, the oops error occurs every day around 2 pm pacific time, and lasts for a couple hours, after which it resolves itself. This would match observations from @rbrassfield of the error occurring at 3 pm mountain time, and from @matthew_cox_omnia at 4:30 pm central time.
There are other periods of oops error during the day as well, but these are shorter and don’t seem to follow a specific pattern.
* full error is: pystac_client.exceptions.APIError "Oops! Something has gone wrong. We have been alerted and are working to resolve the problem. Please try your request again later."
import sys, os
from pystac_client import Client
import time
def checkHLS():
try: # run a large HLS Query:
url = r'https://cmr.earthdata.nasa.gov/stac/LPCLOUD'
cat = Client.open(url)
geom = {
'type': 'Polygon',
'coordinates': [[[-121.48363199406296, 50.58244919445883], # for an ROI near Cache Creek, BC.
[-121.44546042608697, 50.58244919445883], # normally these coords are derived from a .shp
[-121.44546042608697, 50.700797792110535], # but I didn't include that part in this demo.
[-121.48363199406296, 50.700797792110535],
[-121.48363199406296, 50.58244919445883]]]
}
params = {
'intersects': geom,
'collections': ['HLSL30.v2.0'],
'datetime': '2018-01-01/2024-01-01'
}
search = cat.search(**params)
items = search.item_collection()
# If it works, return a status code of 1
return 1, None, None
except: # if it doesn't work, return a status code of 0 and the error message
the_type, the_value, the_traceback = sys.exc_info() # https://stackoverflow.com/a/19406123
return 0, the_type, the_value
There are other periods of oops error during the day as well, but these are shorter and don’t seem to follow a specific pattern.
* full error is: pystac_client.exceptions.APIError "Oops! Something has gone wrong. We have been alerted and are working to resolve the problem. Please try your request again later."
import sys, os
from pystac_client import Client
import time
def checkHLS():
try: # run a large HLS Query:
url = r'https://cmr.earthdata.nasa.gov/stac/LPCLOUD'
cat = Client.open(url)
geom = {
'type': 'Polygon',
'coordinates': [[[-121.48363199406296, 50.58244919445883], # for an ROI near Cache Creek, BC.
[-121.44546042608697, 50.58244919445883], # normally these coords are derived from a .shp
[-121.44546042608697, 50.700797792110535], # but I didn't include that part in this demo.
[-121.48363199406296, 50.700797792110535],
[-121.48363199406296, 50.58244919445883]]]
}
params = {
'intersects': geom,
'collections': ['HLSL30.v2.0'],
'datetime': '2018-01-01/2024-01-01'
}
search = cat.search(**params)
items = search.item_collection()
# If it works, return a status code of 1
return 1, None, None
except: # if it doesn't work, return a status code of 0 and the error message
the_type, the_value, the_traceback = sys.exc_info() # https://stackoverflow.com/a/19406123
return 0, the_type, the_value