yolov12源代码自带的app.py为什么运行不了:ERROR: Exception in ASGI application
Traceback (most recent call last):
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\protocols\http\h11_impl.py", line 403, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\middleware\proxy_headers.py", line 60, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\applications.py", line 112, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 187, in __call__
raise exc
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 165, in __call__
await self.app(scope, receive, _send)
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\route_utils.py", line 761, in __call__
await self.app(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 714, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 734, in app
await route.handle(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 288, in handle
await self.app(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 73, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 301, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 214, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\concurrency.py", line 37, in run_in_threadpool
return await anyio.to_thread.run_sync(func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 2470, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 967, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 431, in main
gradio_api_info = api_info(False)
^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 460, in api_info
app.api_info = app.get_blocks().get_api_info()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\blocks.py", line 2852, in get_api_info
python_type = client_utils.json_schema_to_python_type(info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 893, in json_schema_to_python_type
type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 947, in _json_schema_to_python_type
des = [
^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 948, in <listcomp>
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 955, in _json_schema_to_python_type
f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 901, in _json_schema_to_python_type
type_ = get_type(schema)
^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\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
Traceback (most recent call last):
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\protocols\http\h11_impl.py", line 403, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\middleware\proxy_headers.py", line 60, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\applications.py", line 112, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 187, in __call__
raise exc
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 165, in __call__
await self.app(scope, receive, _send)
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\route_utils.py", line 761, in __call__
await self.app(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 714, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 734, in app
await route.handle(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 288, in handle
await self.app(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 73, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 301, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 214, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\concurrency.py", line 37, in run_in_threadpool
return await anyio.to_thread.run_sync(func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 2470, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 967, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 431, in main
gradio_api_info = api_info(False)
^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 460, in api_info
app.api_info = app.get_blocks().get_api_info()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\blocks.py", line 2852, in get_api_info
python_type = client_utils.json_schema_to_python_type(info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 893, in json_schema_to_python_type
type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 947, in _json_schema_to_python_type
des = [
^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 948, in <listcomp>
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 955, in _json_schema_to_python_type
f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 901, in _json_schema_to_python_type
type_ = get_type(schema)
^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\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
Traceback (most recent call last):
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\protocols\http\h11_impl.py", line 403, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\middleware\proxy_headers.py", line 60, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\applications.py", line 112, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 187, in __call__
raise exc
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 165, in __call__
await self.app(scope, receive, _send)
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\route_utils.py", line 761, in __call__
await self.app(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 714, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 734, in app
await route.handle(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 288, in handle
await self.app(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 73, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 301, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 214, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\concurrency.py", line 37, in run_in_threadpool
return await anyio.to_thread.run_sync(func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 2470, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 967, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 431, in main
gradio_api_info = api_info(False)
^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 460, in api_info
app.api_info = app.get_blocks().get_api_info()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\blocks.py", line 2852, in get_api_info
python_type = client_utils.json_schema_to_python_type(info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 893, in json_schema_to_python_type
type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 947, in _json_schema_to_python_type
des = [
^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 948, in <listcomp>
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 955, in _json_schema_to_python_type
f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 901, in _json_schema_to_python_type
type_ = get_type(schema)
^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\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
Traceback (most recent call last):
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\protocols\http\h11_impl.py", line 403, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\middleware\proxy_headers.py", line 60, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\applications.py", line 112, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 187, in __call__
raise exc
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 165, in __call__
await self.app(scope, receive, _send)
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\route_utils.py", line 761, in __call__
await self.app(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 714, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 734, in app
await route.handle(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 288, in handle
await self.app(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 73, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 301, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 214, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\concurrency.py", line 37, in run_in_threadpool
return await anyio.to_thread.run_sync(func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 2470, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 967, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 431, in main
gradio_api_info = api_info(False)
^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 460, in api_info
app.api_info = app.get_blocks().get_api_info()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\blocks.py", line 2852, in get_api_info
python_type = client_utils.json_schema_to_python_type(info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 893, in json_schema_to_python_type
type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 947, in _json_schema_to_python_type
des = [
^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 948, in <listcomp>
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 955, in _json_schema_to_python_type
f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 901, in _json_schema_to_python_type
type_ = get_type(schema)
^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\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
Traceback (most recent call last):
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\protocols\http\h11_impl.py", line 403, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\uvicorn\middleware\proxy_headers.py", line 60, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\applications.py", line 112, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 187, in __call__
raise exc
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\errors.py", line 165, in __call__
await self.app(scope, receive, _send)
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\route_utils.py", line 761, in __call__
await self.app(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\middleware\exceptions.py", line 62, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 714, in __call__
await self.middleware_stack(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 734, in app
await route.handle(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 288, in handle
await self.app(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
raise exc
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app
await app(scope, receive, sender)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\routing.py", line 73, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 301, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\fastapi\routing.py", line 214, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\starlette\concurrency.py", line 37, in run_in_threadpool
return await anyio.to_thread.run_sync(func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 2470, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\anyio\_backends\_asyncio.py", line 967, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 431, in main
gradio_api_info = api_info(False)
^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\routes.py", line 460, in api_info
app.api_info = app.get_blocks().get_api_info()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\blocks.py", line 2852, in get_api_info
python_type = client_utils.json_schema_to_python_type(info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 893, in json_schema_to_python_type
type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 947, in _json_schema_to_python_type
des = [
^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 948, in <listcomp>
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 955, in _json_schema_to_python_type
f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 901, in _json_schema_to_python_type
type_ = get_type(schema)
^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio_client\utils.py", line 863, in get_type
if "const" in schema:
^^^^^^^^^^^^^^^^^
TypeError: argument of type 'bool' is not iterable
Traceback (most recent call last):
File "G:\yfwh\yolov12-main\app.py", line 165, in <module>
gradio_app.launch()
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\blocks.py", line 2465, in launch
raise ValueError(
ValueError: When localhost is not accessible, a shareable link must be created. Please set share=True or check your proxy settings to allow access to localhost.
Exception in thread Thread-5 (_do_normal_analytics_request):
Traceback (most recent call last):
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_transports\default.py", line 101, in map_httpcore_exceptions
yield
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_transports\default.py", line 250, in handle_request
resp = self._pool.handle_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpcore\_sync\connection_pool.py", line 256, in handle_request
raise exc from None
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpcore\_sync\connection_pool.py", line 236, in handle_request
response = connection.handle_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpcore\_sync\connection.py", line 101, in handle_request
raise exc
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpcore\_sync\connection.py", line 78, in handle_request
stream = self._connect(request)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpcore\_sync\connection.py", line 156, in _connect
stream = stream.start_tls(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpcore\_backends\sync.py", line 154, in start_tls
with map_exceptions(exc_map):
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\contextlib.py", line 158, in __exit__
self.gen.throw(typ, value, traceback)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpcore\_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.ConnectTimeout: _ssl.c:989: The handshake operation timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\threading.py", line 1045, in _bootstrap_inner
self.run()
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\threading.py", line 982, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\analytics.py", line 70, in _do_normal_analytics_request
data["ip_address"] = get_local_ip_address()
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\site-packages\gradio\analytics.py", line 131, in get_local_ip_address
ip_address = httpx.get(
^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_api.py", line 195, in get
return request(
^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_api.py", line 109, in request
return client.request(
^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_client.py", line 825, in request
return self.send(request, auth=auth, follow_redirects=follow_redirects)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_client.py", line 914, in send
response = self._send_handling_auth(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_client.py", line 942, in _send_handling_auth
response = self._send_handling_redirects(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_client.py", line 979, in _send_handling_redirects
response = self._send_single_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_client.py", line 1014, in _send_single_request
response = transport.handle_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_transports\default.py", line 249, in handle_request
with map_httpcore_exceptions():
File "C:\Users\yanfwh\.conda\envs\yolov12\Lib\contextlib.py", line 158, in __exit__
self.gen.throw(typ, value, traceback)
File "C:\Users\yanfwh\AppData\Roaming\Python\Python311\site-packages\httpx\_transports\default.py", line 118, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ConnectTimeout: _ssl.c:989: The handshake operation timed out
最新发布