Skip to content

asyncio.exceptions.TimeoutError #20

@kolt54321

Description

@kolt54321

Hi @lovasoa! I've recently hit this error a few times. Any idea if we could put in a retry in the code?

https://artsandculture.google.com/asset/the-last-day-of-pompeii-karl-brullov/tAFrCGFUhXM8Jg
Defaulting to highest zoom level (8).
Zoom level 8 too high for JPEG output, using next zoom level 7 instead
Using zoom level 7.
Downloading tiles...
Traceback (most recent call last):
  File "C:\Users\i\Downloads\gapdecoder\async_tile_fetcher.py", line 8, in modified
    return await f(*args, **kwargs)
  File "C:\Users\i\Downloads\gapdecoder\async_tile_fetcher.py", line 22, in fetch
    async with session.get(url) as response:
  File "C:\Users\i\AppData\Local\Programs\Python\Python38\lib\site-packages\aiohttp\client.py", line 1012, in __aenter__
    self._resp = await self._coro
  File "C:\Users\i\AppData\Local\Programs\Python\Python38\lib\site-packages\aiohttp\client.py", line 582, in _request
    break
  File "C:\Users\i\AppData\Local\Programs\Python\Python38\lib\site-packages\aiohttp\helpers.py", line 596, in __exit__
    raise asyncio.TimeoutError from None
asyncio.exceptions.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "tile_fetch_3.py", line 353, in <module>
    main()
  File "tile_fetch_3.py", line 306, in main
    loop.run_until_complete(coro)
  File "C:\Users\i\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 608, in run_until_complete
    return future.result()
  File "tile_fetch_3.py", line 162, in load_tiles
    tiles = await async_tile_fetcher.gather_progress(awaitable_tiles)
  File "C:\Users\i\Downloads\gapdecoder\async_tile_fetcher.py", line 42, in gather_progress
    total = await asyncio.gather(*[
  File "C:\Users\i\Downloads\gapdecoder\async_tile_fetcher.py", line 36, in print_percent
    res = await awaitable
  File "tile_fetch_3.py", line 118, in fetch_tile
    encrypted_bytes = await async_tile_fetcher.fetch(session, image_url, file_path)
  File "C:\Users\i\Downloads\gapdecoder\async_tile_fetcher.py", line 13, in modified
    raise err
Exception

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions