Skip to main content

Hi!


I am using EO-Learn and would like to construct an averaged histogram of a bounding box, therefore I need to loop over many FIS Requests. When I do I seem to be getting an issue with something like “TOO_MANY_REQUEST”… Is it possible to fix this? I am using the month free trial at sentinel-hub at this moment.


Can you help me?


More detailed, when running:


histogram_request = FisRequest(

layer = …,

geometry_list = …,

time = exact_date,

resolution = ‘10m’,

data_source = DataSource.SENTINEL2_L2A,

image_format=MimeType.TIFF_d8,

custom_url_params = {CustomUrlParam.EVALSCRIPT: eval_script},

data_folder = ‘…’

)


histogram_request.get_data(save_data=True, redownload = False, raise_download_errors = True)


I get the following error message;


…\sentinelhub\data_request.py in _execute_data_download(self, data_filter, redownload, max_threads, raise_download_errors, decode_data)

178

179 client = self.download_client_class(redownload=redownload, raise_download_errors=raise_download_errors)

–> 180 data_list = client.download(filtered_download_list, max_threads=max_threads, decode_data=decode_data)

181

182 if is_repeating_filter:


…\sentinelhub\download\client.py in download(self, download_requests, max_threads, decode_data)

77 if self.raise_download_errors:

78 traceback = sys.exc_info()t2]

—> 79 raise download_exception.with_traceback(traceback)

80

81 warnings.warn(str(download_exception), category=SHRuntimeWarning)


…\sentinelhub\download\client.py in download(self, download_requests, max_threads, decode_data)

73 for future in download_list:

74 try:

—> 75 data_list.append(future.result())

76 except DownloadFailedException as download_exception:

77 if self.raise_download_errors:


…(myAnacondaEnv)\lib\concurrent\futures_base.py in result(self, timeout)

430 raise CancelledError()

431 elif self._state == FINISHED:

–> 432 return self.__get_result()

433

434 self._condition.wait(timeout)


…(myAnacondaEnv)\lib\concurrent\futures_base.py in __get_result(self)

386 def __get_result(self):

387 if self._exception:

–> 388 raise self._exception

389 else:

390 return self._result


…(myAnacondaEnv)\lib\concurrent\futures\thread.py in run(self)

55

56 try:

—> 57 result = self.fn(*self.args, **self.kwargs)

58 except BaseException as exc:

59 self.future.set_exception(exc)


…sentinelhub\download\client.py in _single_download(self, request, decode_data)

98 return None

99

–> 100 response_content = self._execute_download(request)

101

102 if request_path and request.save_response and (self.redownload or not os.path.exists(request_path)):


…sentinelhub\download\handlers.py in new_download_func(self, request)

42 for attempt_num in range(download_attempts):

43 try:

—> 44 return download_func(self, request)

45 except requests.RequestException as exception:

46


…sentinelhub\download\handlers.py in new_download_func(self, request)

25 exception.response.status_code != requests.status_codes.codes.TOO_MANY_REQUESTS:

26

—> 27 raise DownloadFailedException(_create_download_failed_message(exception, request.url)) from exception

28 raise exception from exception

29


DownloadFailedException: Failed to download from:
https://services.sentinel-hub.com/ogc/fis/----

with HTTPError:

400 Client Error: Bad Request for url: https://services.sentinel-hub.com/ogc/fis/----

Server response: “Cannot deserialize instance of java.lang.String out of START_ARRAY token

at aSource: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 340] (through reference chain: com.sinergise.sentinel.ogc.fis.FisRequestr“bins”])”

Be the first to reply!

Reply