Hello sentinel-hub team!
I’m trying to retrieve sentinel-1 images using two functions:
The diesr function get the dates of available images and the second function is the sentinel hub request. I’m using these functions inside a for loop that iterates through geopandas dataframe.
The problem is that it fails to download with the following message:
DownloadFailedException: Failed to download from:
https://services.sentinel-hub.com/api/v1/pro
with HTTPError:
400 Client Error: Bad Request for url: https://services…
Server response: “{“error”:{“status”:400,“reason”:“Bad Request”,“message”:“Dataset with id: 0 not found.”,“code”:“RENDERER_EXCEPTION”}}”
Here are the fucntions I use:
evalscript = """
//VERSION=3
function setup() {
  return {
    input: ["VV","VH"],
    output: { bands: 2,sampleType:"FLOAT32"}
  };
}
function evaluatePixel(sample) {
  return [10 * Math.log((samples.VV)+0.0001) / Math.LN10, 10 * Math.log((samples.VH)+0.0001) / Math.LN10];
}
"""
def get_dates(time_interval,bbox):
    
    date_res=[]
    
    catalog = SentinelHubCatalog(config=config)
    
    tiles = list(catalog.search(
        collection=DataCollection.SENTINEL1_IW,
        time=time_interval,
        bbox=bbox
    ))    
    
    
    dates = [parse_time(t['properties']['datetime']) for t in tiles]
    
    
    for i in dates:
        new_date=i.date().strftime('%Y-%m-%d')
        date_res.append(new_date)
    dates=list(set(date_res))
    
    
    return dates
def access_sen1(evalscript,date,geom,bbox,bbox_size):
    """
    
    """
    #get the date as string
    request = SentinelHubRequest(
        evalscript=evalscript,
        geometry=Geometry(geom,crs=CRS.WGS84),
        input_data=[
            SentinelHubRequest.input_data(
                data_collection=DataCollection.SENTINEL1_IW,
                time_interval=(date,date),        
                other_args = {"dataFilter":{"resolution":"HIGH","acquisitionMode":"IW"},"processing":{"backCoeff":"GAMMA0_TERRAIN","orthorectify":True,"demInstance":"COPERNICUS"},"id":"S1GRD"}
            )
        ],
        responses=[
            SentinelHubRequest.output_response('default', MimeType.TIFF), 
        ],
        data_folder='fake/folder',  
        bbox=bbox,
        size=bbox_size,
        config=config
    )
    response = request.get_data() 
    
    
    vv=response[0][:,:,0]
    vh=response[0][:,:,1]
    s1_bands=np.dstack((vv,vh))
    
    return s1_bands
When I run the dates functions, I do get dates so I believe that this is not the problem, but I couldn’t find any mistake in the evalscript ot the request function.
Please help me to find the issue 🙂
My end goal: retrieve sentinel 1 image using my functions
