启动webui后,点击任何按钮都报超时错误
执行python3 webui.py --port 9886 --model_dir speech_tts/CosyVoice-300M后,在webui上点击任何按钮都会报超时错误,如下图
控制台报错信息如下。该怎么解决啊
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/pydantic/type_adapter.py", line 210, in init
core_schema = _getattr_no_parents(type, 'pydantic_core_schema')
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/pydantic/type_adapter.py", line 98, in _getattr_no_parents
raise AttributeError(attribute)
AttributeError: pydantic_core_schema
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 406, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 70, in call
return await self.app(scope, receive, send)
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/starlette/applications.py", line 113, in call
await self.middleware_stack(scope, receive, send)
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/starlette/middleware/errors.py", line 187, in call
raise exc
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/starlette/middleware/errors.py", line 165, in call
await self.app(scope, receive, _send)
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/gradio/route_utils.py", line 720, in call
await self.simple_response(scope, receive, send, request_headers=headers)
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/gradio/route_utils.py", line 736, in simple_response
await self.app(scope, receive, send)
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/starlette/middleware/exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/starlette/_exception_handler.py", line 62, in wrapped_app
raise exc
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/starlette/_exception_handler.py", line 51, in wrapped_app
await app(scope, receive, sender)
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/starlette/routing.py", line 715, in call
await self.middleware_stack(scope, receive, send)
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/starlette/routing.py", line 735, in app
await route.handle(scope, receive, send)
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/starlette/routing.py", line 288, in handle
await self.app(scope, receive, send)
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/starlette/routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/starlette/_exception_handler.py", line 62, in wrapped_app
raise exc
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/starlette/exception_handler.py", line 51, in wrapped_app
await app(scope, receive, sender)
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/starlette/routing.py", line 73, in app
response = await f(request)
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/fastapi/routing.py", line 291, in app
solved_result = await solve_dependencies(
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/fastapi/dependencies/utils.py", line 639, in solve_dependencies
) = await request_body_to_args( # body_params checked above
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/fastapi/dependencies/utils.py", line 813, in request_body_to_args
fields_to_extract = get_model_fields(first_field.type)
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/fastapi/_compat.py", line 283, in get_model_fields
return [
File "/opt/anaconda3/envs/cosyvoice/lib/python3.8/site-packages/fastapi/_compat.py", line 284, in 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(__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.7/u/schema-for-unknown-type
Same issue, any solutions?
looks like a gradio problem, never seen it
可能是一些依赖包版本问题,可以试试修改成这样: pydantic==2.8.2 pydantic-core==2.20.1 fastapi==0.112.4
我这改完后就好了。
参考: https://github.com/oobabooga/text-generation-webui/issues/6367#issuecomment-2333704584
可能是一些依赖包版本问题,可以试试修改成这样: pydantic==2.8.2 pydantic-core==2.20.1 fastapi==0.112.4
我这改完后就好了。
感谢,把fastapi降级到0.112.4好了
This issue is stale because it has been open for 30 days with no activity.