I'm trying to acess Sentinel1 images using sentinelhub API with Jupyter lab notebook. I'm getting error messages and I don't understand why I get them.

This is how I try to acess umages with IW (as mentioned in the documentation, with specifcying asc or desc):

import os
import datetime
import numpy as np
import matplotlib.pyplot as plt

from sentinelhub import MimeType, CRS, BBox, SentinelHubRequest, SentinelHubDownloadClient, \
    DataCollection, bbox_to_dimensions, DownloadRequest,WmsRequest, WcsRequest, MimeType

#define bbox:
bbox_coords_wgs84 = [-44.763, -6.782, -44.583, -6.896]
bbox = BBox(bbox=bbox_coords_wgs84, crs=CRS.WGS84)


s1_request = WmsRequest(

s1_data = s1_request.get_data()

>>>DownloadFailedException: Failed to download from: *link*   
with HTTPError:
400 Client Error: Bad Request for url: *long url*  

Server response: "Layer TRUE-COLOR-S1-IW not found"

I also tried specifying:

s1_asc_request = WmsRequest(

s1_asc_data = s1_asc_request.get_data()

IndexError                                Traceback (most recent call last)
<ipython-input-12-2bc6f9148c34> in <module>
     10 s1_asc_data = s1_asc_request.get_data()
---> 11 plot_image(s1_asc_data[-1])

IndexError: list index out of range

I don't know why I get thise errors; it seems like I do almost the same as in the tutorial. What is my mistake? Why do I get those errors?

My end goal: to be able to import Sentinel1 images (vh and vv)


The error mentions there is a layer missing in the Sentinel Hub configuration you are using to perform a WMS request. See documentation on how to configure your account before using sentinelhub-py.

If I guessed correctly your SH credentials, I have added a new configuration with the instance ID:

Go to Configuration utiity to find the full ID: https://apps.sentinel-hub.com/dashboard/#/configurations/

  • thank you for your answer. I am not sure is my credentials because I haven't seen it. If it relates to the configurations, then I can tell that I have created sentinel1 configuration (sentinel1 template configuration) , so i'm not sure if that what you said you did – Reut Dec 7 '20 at 8:04
  • To use sentinelhub-py out of the box, you will need to have "Python instance template". – Grega M. Dec 7 '20 at 11:54
  • sorry, I still don't understand, the Sentinel1 configuration is not good for retreiving sentinel1 images? I also don't have "python instance template" in the configurations. Does the sentinel1 configuration is only good for the bbox you have in the tutorial? i'm very confused... – Reut Dec 9 '20 at 8:55
  • 1
    sentinel-1 configuration is perfectly fine for retreiving sentinel-1 data. However, if you are using sentinelhub-py in the way you are using it, the libraries assume some very specific configuration and names of the layers (which are not the same as in Sentinel-1 configuration). If you do "Add new configuration" and then choose "select from existing instance", you can then choose "Python scripts template". – Grega M. Dec 10 '20 at 9:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.