【bug】gradio ERROR: Exception in ASGI application pydantic.errors.PydanticSchemaGenerationError

【bug】gradio ERROR: Exception in ASGI application pydantic.errors.PydanticSchemaGenerationError

环境

产生**错误**的环境

python 3.8

gradio==4.8.0
fastapi==0.112.4	
gradio-client==1.3.0
pydantic==2.9.2
pydantic-core==2.23.4

详情

错误详情

ERROR:    Exception in ASGI application
Traceback (most recent call last):
....
pydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema for <class 'starlette.requests.Request'>. Set `arbitrary_types_allowed=True` in the model_config to ignore this error or implement `__get_pydantic_core_schema__` on your type to fully support it.

这是由于gradio版本与pydantic版本不匹配导致的错误。

解决方法

更新 gradio版本

pip install gradio==4.43.0

目前只测试了4.43.0,最新版本并没有进行测试,可以自行尝试

参考

Pydantic-core 2.23.2 is breaking gradio

MiniCPM-V 2.6 本地部署 出现ERROR: Exception in ASGI application错误_error: exception in asgi application traceback (mo-优快云博客

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值