Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upasyncio.exceptions.TimeoutError #20
Comments
|
Hi ! Yes, we could implement a retry. We should also make the timeout configurable |
|
I'm not sure if this is related, but I also got the following error today:
|
|
Yes, it's on google's end. |
|
Any idea how we'd do it for gapdecoder? I'm not very familiar with the internet side of the program so it would be great if we had something along those lines here. In the meantime for my personal use I can let it skip the image if it encounters and error, but here there should probably be a more permanent solution. I'm still moping that I can't figure out how to adapt the rust code that cleanly gets around the memory issue... |
|
The code would look something like that : async def retry_get(url, retries):
s = 1
err = None
for i in range(retries):
try:
return await get(url)
except HTTPError as e:
err = e
await asyncio.sleep(s)
s *= 2
raise err |
|
Or you can use a library such as https://tenacity.readthedocs.io/en/latest/ |
Hi @lovasoa! I've recently hit this error a few times. Any idea if we could put in a retry in the code?