AwsTileRequest return Read timeout on endpoint URL: "None"

I try download data using following code:

from sentinelhub.aws import AwsTileRequest

request = AwsTileRequest(
    tile='38LPH',
    time='2017-12-15',
    aws_index=0,
    bands=["R10m/B04","R10m/B03","R10m/B02"],
    metafiles=None,
    data_folder='./images',
    data_collection=DataCollection.SENTINEL2_L2A
)
request.save_data()

The output error:

timeout                                   Traceback (most recent call last)
File ~/anaconda3/envs/wbcrawler/lib/python3.9/site-packages/urllib3/response.py:444, in HTTPResponse._error_catcher(self)
    443 try:
--> 444     yield
    446 except SocketTimeout:
    447     # FIXME: Ideally we'd like to include the url in the ReadTimeoutError but
    448     # there is yet no clean way to get at it from this context.

File ~/anaconda3/envs/wbcrawler/lib/python3.9/site-packages/urllib3/response.py:567, in HTTPResponse.read(self, amt, decode_content, cache_content)
    566 with self._error_catcher():
--> 567     data = self._fp_read(amt) if not fp_closed else b""
    568     if amt is None:

File ~/anaconda3/envs/wbcrawler/lib/python3.9/site-packages/urllib3/response.py:533, in HTTPResponse._fp_read(self, amt)
    531 else:
    532     # StringIO doesn't like amt=None
--> 533     return self._fp.read(amt) if amt is not None else self._fp.read()

File ~/anaconda3/envs/wbcrawler/lib/python3.9/http/client.py:476, in HTTPResponse.read(self, amt)
    475 try:
--> 476     s = self._safe_read(self.length)
    477 except IncompleteRead:

File ~/anaconda3/envs/wbcrawler/lib/python3.9/http/client.py:626, in HTTPResponse._safe_read(self, amt)
...
--> 102     raise ReadTimeoutError(endpoint_url=e.url, error=e)
    103 except URLLib3ProtocolError as e:
    104     raise ResponseStreamingError(error=e)

ReadTimeoutError: Read timeout on endpoint URL: "None"

Anyone can help? Thank advance!

Hi @hminhtri19 ,

Could you try to add an argument config=SHConfig() to your AwsTileRequest class? Other than this it works fine for me.

Note that class AwsTileRequest has been deprecated. It will remain in the codebase for now, but it won’t be actively maintained.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.