在调试运行python应用TRELLIS的时候发生报错,无法启动应用,部分错误信息如下:
ERROR: Exception in ASGI application
Traceback (most recent call last):
File “D:\python\TRELLIS20250411\py310\lib\site-packages\uvicorn\protocols\http\h11_impl.py”, line 403, in run_asgi
result = await app( # type: ignore[func-returns-value]
File “D:\python\TRELLIS20250411\py310\lib\site-packages\uvicorn\middleware\proxy_headers.py”, line 60, in call
……………..
raise exc
File “D:\python\TRELLIS20250411\py310\lib\site-packages\starlette\middleware\errors.py”, line 165, in call
await self.app(scope, receive, send) File “D:\python\TRELLIS20250411\py310\lib\site-packages\gradio\route_utils.py”, line 761, in call await self.app(scope, receive, send) File “D:\python\TRELLIS20250411\py310\lib\site-packages\starlette\middleware\exceptions.py”, line 62, “D:\python\TRELLIS20250411\py310\lib\site-packages\gradio_client\utils.py”, line 901, in _json_schema_to_python_type type = get_type(schema)
File “D:\python\TRELLIS20250411\py310\lib\site-packages\gradio_client\utils.py”, line 863, in get_type
if “const” in schema:
TypeError: argument of type ‘bool’ is not iterable
ERROR: Exception in ASGI application
………………….
这个问题是gradio和pydantic版本冲突导致的,我当前gradio版本为4.44.1,pydantic版本为2.11.3
解决办法降低pydantic版本就可以了,重新安装pydantic版本2.10.6