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即可

电脑不给力运行不了?试试高配云电脑>>
如需1对1人工答疑支持
赞(0) 打赏
软件无法使用?点击查看常见问题说明>>

最近更新

项目实操变现思路分享之AI绘画-诺瓦小站

项目实操变现思路分享之AI绘画

本次和大家分享的实操项目变现思路是AI绘画相关的,虽然AI绘画已经火了很久了,但是仍有很多玩法,有了其它一些AI工具的加持,操作起来也更容易,项目具体内容请看PDF文档。 教程链接: https://afdian.com/p/982e793...

项目实操变现思路分享之AI视频-诺瓦小站

项目实操变现思路分享之AI视频

目前AI视频生成技术有了比较大的进步,AI视频现在已经很流畅丝滑,视频效果也很好,用户也比较喜欢看。各短视频平台AI视频的流量都很大,我们可以通过AI工具创建AI视频来获取流量变现,操作简单上手较快。下面分享一下AI视频的实操变现思路。 项...

AI软件实战变现思路分享之AI音乐-诺瓦小站

AI软件实战变现思路分享之AI音乐

本次和大家分享的AI软件实战变现项目是AI音乐相关的,前两天和大家分享了两个AI音乐生成软件,顺便接着分享一下AI音乐的实战变现思路,项目实操教程下载链接: https://afdian.com/p/99e81c38fe2f11efb2b4...

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

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

支付宝扫一扫

微信扫一扫