Add httpx error to failable handler

pull/44/head
Guillermo Rodriguez 2025-01-18 15:14:57 -03:00
parent e757105444
commit 656693e719
No known key found for this signature in database
GPG Key ID: 002CC5F1E6BDA53E
3 changed files with 14 additions and 204 deletions

202
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -20,13 +20,8 @@ numpy = "<2.1"
gguf = "^0.14.0"
protobuf = "^5.29.3"
zstandard = "^0.23.0"
diskcache = "^5.6.3"
bitsandbytes = "^0.45.0"
hqq = "^0.2.2"
optimum-quanto = "^0.2.6"
basicsr = "^1.4.2"
realesrgan = "^0.3.0"
click = "^8.1.8"
httpx = "^0.28.1"
[tool.poetry.group.frontend]
optional = true
@ -64,6 +59,11 @@ accelerate = {version = '0.34.0'}
transformers = {version = '4.48.0'}
huggingface-hub = {version = '^0.27.1'}
invisible-watermark = {version = '^0.2.0'}
bitsandbytes = "^0.45.0"
hqq = "^0.2.2"
optimum-quanto = "^0.2.6"
basicsr = "^1.4.2"
realesrgan = "^0.3.0"
[[tool.poetry.source]]
name = 'torch'

View File

@ -11,6 +11,7 @@ from functools import partial
import asks
import trio
import anyio
import httpx
from PIL import Image, UnidentifiedImageError
@ -253,7 +254,8 @@ async def failable(fn: partial, ret_fail=None):
json.JSONDecodeError,
asks.errors.RequestTimeout,
asks.errors.BadHttpResponse,
anyio.BrokenResourceError
anyio.BrokenResourceError,
httpx.ReadError
) as e:
return ret_fail