AI软件下载
有趣网站推荐及实用软件下载

call handler.generate_schema() since we do not call __get_pydantic_core_schema__ gradio报错Unexpected token 'I', "Internal S"... is not valid JSON

python应用运行时报错,部分信息如下:

ERROR: Exception in ASGI application Traceback (most recent call last): File “lib\site-packages\pydantic\type_adapter.py”, line 270, in _init_core_attrs self._core_schema = _getattr_no_parents(self._type, ‘__pydantic_core_schema__’) File “lib\site-packages\pydantic\type_adapter.py”, line 112, in _getattr_no_parents raise “D:\python\LivePortrait20241010\myenv\lib\site-packages\pydantic\type_adapter.py”, line 135, in wrapped return func(self, *args, **kwargs) File “D:\python\LivePortrait20241010\myenv\lib\site-packages\pydantic\type_adapter.py”, line 277, in _init_core_attrs self._core_schema = _get_schema(self._type, config_wrapper, parent_depth=self._parent_depth) File “D:\python\LivePortrait20241010\myenv\lib\site-packages\pydantic\type_adapter.py”, line 95, in _get_schema schema = gen.generate_schema(type_) File packages\pydantic\_internal\_generate_schema.py”, line 558, in _unknown_type_schema raise PydanticSchemaGenerationError( 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. If you got this error by calling handler(<some type>) within __get_pydantic_core_schema__ then you likely need to call handler.generate_schema(<some type>) since we do not call __get_pydantic_core_schema__ on <some type> otherwise to avoid infinite recursion. For further information visit https://errors.pydantic.dev/2.9/u/schema-for-unknown-type

错误信息一大串,我主要是在使用gradio生成的webui界面操作的时候报错:

Assist:gradion ui opens to input or generate an error Could not parse server response: SyntaxError: Unexpected token ‘I’, “Internal S”… is not valid JSON

上面信息主要是由于gradio BUG引起的错误,卸载重装或升级gradio和gradio_client即可

领即梦AI免费积分,开启AI创作之旅:速领>>

软件催更及1对1人工答疑支持: https://nuowa.net/1806
赞(0) 打赏
软件无法使用?点击查看常见问题说明>>

最近更新

免费在线视频去水印工具方法-诺瓦小站

免费在线视频去水印工具方法

本次分享一个免费的在线视频去水印工具–记灵 这个在线工具目前是完全免费的,上传mp4视频文件,然后鼠标框选去水印区域,然后点击处理等待处理完成就可以了,操作非常简单。 这个去水印工具是采用打码的方式覆盖原水印区域的,并不是AI智...

Unreal Engine 5恐怖游戏设计制作教程,从入门到精通从零开始完整项目开发详细讲解,中英文字幕-诺瓦小站

Unreal Engine 5恐怖游戏设计制作教程,从入门到精通从零开始完整项目开发详细讲解,中英文字幕

和大家分享一个以前收集的UE5虚幻引擎恐怖游戏开发教程,这是国外一个大神制作的视频教程,教程从零开始到制作出一款完整的游戏。内容讲解全面,如蓝图基础知识讲解、角色控制、高级交互系统、高级库存系统、物品检查、恐怖环境氛围设计、过场动画、AI系...

觉得文章对你有帮助就打赏一下作者

非常感谢你的打赏,我将有更多的动力继续提供优质内容,让我们一起创建更加美好的世界!

支付宝扫一扫

微信扫一扫