Error 400 Invalid Request Since Last Night

Since last night / this morning I’ve been receiving an error saying invalid request when trying to get any imagery data. I’m using the python package and creating a WMS request. The request can be created shows a valid request, I can get dates from the imagery but as soon as I try to get the data it returns an error 400 invalid request. This exact request worked last night.

box = BBox(bbox = Coordinates,crs=CRS.WGS84)
w,h = bbox_to_dimensions(box, 10)
#we'll request the sentinel 2a images over the last month
wms_request = WmsRequest(data_source=DataSource.SENTINEL2_L2A,
                         layer='ALLBANDSFLOAT',
                         bbox=box,
                         time=(datetime.datetime.today() - datetime.timedelta(days = 30), datetime.datetime.today()),
                         width=w,image_format=MimeType.TIFF_d32f,
                         config = config)

ALLBANDSFLOAT is a custom v3 script set to return a full image in float format and was working until yesterday. I tried basic scripts as well and all return the same error.

wms_request.get_data() returns this error with my instance ID censored.

Failed to download from:
https://services.sentinel-hub.com/ogc/wms/******************************************************?SERVICE=wms&MAXCC=100.0&BBOX=-37.06938%2C140.84246%2C-37.06162%2C140.86037&FORMAT=image%2Ftiff%3Bdepth%3D32f&CRS=EPSG%3A4326&TIME=2020-11-12T00%3A47%3A12%2F2020-11-12T00%3A47%3A12&WIDTH=159&HEIGHT=86&LAYERS=ALLBANDSFLOAT&REQUEST=GetMap&VERSION=1.3.0
with HTTPError:
400 Client Error: Bad Request for url: https://services.sentinel-hub.com/ogc/wms/***************************************************?SERVICE=wms&MAXCC=100.0&BBOX=-37.06938%2C140.84246%2C-37.06162%2C140.86037&FORMAT=image%2Ftiff%3Bdepth%3D32f&CRS=EPSG%3A4326&TIME=2020-11-12T00%3A47%3A12%2F2020-11-12T00%3A47%3A12&WIDTH=159&HEIGHT=86&LAYERS=ALLBANDSFLOAT&REQUEST=GetMap&VERSION=1.3.0
Server response: "Invalid request"

I should say my colleague with a different account is also getting the exact same error.

Hi @james,

could you please provide first two groups of characters of your instance id, so that we can check what is happening.

Thank you,
Anja

Hi @avrecko,

The first two groups are:

25491e86-23a4

This also occurs on my colleagues which is

69e7304d-103c

I’ve tried WCS requests on pre made bands etc and all fails.

Hi @james,

this was an inconsistency introduced with the latest deploy on our side. The issue resulted in failed requests where first and second given dates/times of TIME parameter were the same. We fixed it and should work now. Let me know in case of further problems.
Thank you for reporting!

Best, Anja

@avrecko

Right I see so by calling datetime.today() I was generating a fixed time and then a window to the same exact time but days before caused the issue.

I can confirm that it seems to be working now. Thanks for the response!

WMS generation does not work. Today I bought a subscription and WMS links do not work

link

Hello,

Can you specify more about your error please? The link you provided works for me!

Maxim

Yes, after 30 minutes everything works. Maybe it was a problem for a new user to buy a subscription.

Sometimes it takes up to an hour for all of our systems to refresh with the updated subscriptions.
Sorry for the inconvenience.

Hi All.
Same error for me:

400 Client Error: Bad Request for url: https://services.sentinel-hub.com/ogc/wcs/[...]
Server response: “Invalid request”.

[fb7e5d9a-1d6e]
Dennis.

Can you send an exemplery WCS request (mask part of the instance ID), so that we can debug it?

One thing you can do is to check if your request is less than 2500x2500px. We are aware of this kind of server response in cases when request is larger than that.

Hi Grega.

https://services.sentinel-hub.com/ogc/wcs/[...]?SERVICE=wcs&WARNINGS=False&MAXCC=100.0&ShowLogo=False&Transparent=True&BBOX=626447.7477002416%2C4964776.04090641%2C665198.6980180814%2C5007080.952704286&FORMAT=image%2Ftiff%3Bdepth%3D32f&CRS=EPSG%3A32632&TIME=2020-09-30T08%3A18%3A16%2F2020-09-30T12%3A18%3A16&RESX=10m&RESY=10m&COVERAGE=DM_TRUE_COLOR_RC&REQUEST=GetCoverage&VERSION=1.1.2

Thanks

As I have guessed above, the problem is in requesting too large image. Unless I am mistaken, the area you have defined, with 10 meter resolution, comes to 3880x4230 px, more than 2500x2500px.
You will therefore have to split this area in smaller part.

You might want to check sentinelhub-py Large Area Utilities option:

As a side note, I see you are defining format=image/tiff;depth=32f. As communicated in this post (and over e-mails to all the users), the “depth” part of the parameter is ignored after November 1st.
I suggest you check these instructions on how to port your process to V3:

1 Like

Hi.

In fact, last time I execute this script was before Nov 1.
And I’ve in the past already used splitter.
I solved splitting the original geometry in smaller parts (5, 5) -> (10,10).

Thanks!