WCS Request returns broken data in python API

I am observing that, when trying to download data with a WcsRequest at the following location:

top_left = (23.1570966729984349, 43.6272301263683104)
lower_right = (23.4245862660253366, 43.4903263866232521)

And the following resolution:

resx = ‘2.106364198720723557m’
resy = ‘2.106209045199899155m’

I am receiving nonsensical data. Specifically, the data I receive is a list of 5000x5000x3 arrays of mostly 255 values (all white images with a small number of red pixels). A WmsRequest at the same location does, however, return the correct data. However, the WmsRequest also fails if the width exceeds a certain threshold, with a DownloadExceptionError being raised.

The code for the request is:

target = datetime.datetime.strptime(‘2020-03-31’, ‘%Y-%m-%d’)
start = target - datetime.timedelta(1*365/12)
wcs_request = WcsRequest(

and it provides a URL with instance ID masked of:

Any Advice?

Unless you have some particular reason for requesting 2.xx m resolution, could you retry with requesting 10m resolution?

The highest resolution of Sentinel-2 bands is 10m/px. See e.g. this link.

It works with resolutions down to 5m and bellow that the data becomes the garbage data. It works at 2m resolution for other locations. We’re requesting it as that to bring it in line with other imagery for machine learning work rather than us having to do post processing rescaling of the imagery. This question is mostly about figuring out why it breaks down at this point for consistency in pipelines.

Hi James,
just to clarify one issue, not sure if related.
If I convert the WCS call into simple true color, I get almost empty image as well (there is a lot of white space below, so keep reading)


This is probably due to TIME parameter being too accurate - you are on the border of two scenes and the one below has different acqusition time. If you change this to date alone, you get:

Now if you add your desired resolution in the call above, you will see this image, which somehow correlates with your initial description of the issue. So you simply need to reduce the size, best under 2000x2000px if you want to avoid issues.

Two more comments on this:
-there is an option to replace such warnings with HTTP error; I think it is already implemented as a default in latest version of sentinelhub-py
-sometimes it is good to have a visual inspection of the data you are trying to use, makes things much clearer