web-ui: Error running the usage command on macOS

I tried both Local Installation and Docker Installation.

Everything installs fine but when I run python webui.py --ip 127.0.0.1 --port 7788, I get:

Terminal Log
$ python webui.py
INFO     [browser_use] BrowserUse logging setup complete with level info
* Running on local URL:  http://127.0.0.1:7788
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in __call__
    raise exc
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in __call__
    await self.app(scope, receive, _send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/route_utils.py", line 789, in __call__
    await self.app(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 714, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 734, in app
    await route.handle(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
    await self.app(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
    response = await f(request)
               ^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 37, in run_in_threadpool
    return await anyio.to_thread.run_sync(func)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/routes.py", line 553, in main
    gradio_api_info = api_info(request)
                      ^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/routes.py", line 583, in api_info
    api_info = utils.safe_deepcopy(app.get_blocks().get_api_info())
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/blocks.py", line 2994, in get_api_info
    python_type = client_utils.json_schema_to_python_type(info)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 920, in json_schema_to_python_type
    type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 974, in _json_schema_to_python_type
    des = [
          ^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 975, in <listcomp>
    f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 982, in _json_schema_to_python_type
    f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 928, in _json_schema_to_python_type
    type_ = get_type(schema)
            ^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 887, 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 "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in __call__
    raise exc
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in __call__
    await self.app(scope, receive, _send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/route_utils.py", line 789, in __call__
    await self.app(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 714, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 734, in app
    await route.handle(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
    await self.app(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
    response = await f(request)
               ^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 37, in run_in_threadpool
    return await anyio.to_thread.run_sync(func)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/routes.py", line 553, in main
    gradio_api_info = api_info(request)
                      ^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/routes.py", line 583, in api_info
    api_info = utils.safe_deepcopy(app.get_blocks().get_api_info())
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/blocks.py", line 2994, in get_api_info
    python_type = client_utils.json_schema_to_python_type(info)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 920, in json_schema_to_python_type
    type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 974, in _json_schema_to_python_type
    des = [
          ^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 975, in <listcomp>
    f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 982, in _json_schema_to_python_type
    f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 928, in _json_schema_to_python_type
    type_ = get_type(schema)
            ^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 887, 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 "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in __call__
    raise exc
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in __call__
    await self.app(scope, receive, _send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/route_utils.py", line 789, in __call__
    await self.app(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 714, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 734, in app
    await route.handle(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
    await self.app(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
    response = await f(request)
               ^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 37, in run_in_threadpool
    return await anyio.to_thread.run_sync(func)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/routes.py", line 553, in main
    gradio_api_info = api_info(request)
                      ^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/routes.py", line 583, in api_info
    api_info = utils.safe_deepcopy(app.get_blocks().get_api_info())
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/blocks.py", line 2994, in get_api_info
    python_type = client_utils.json_schema_to_python_type(info)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 920, in json_schema_to_python_type
    type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 974, in _json_schema_to_python_type
    des = [
          ^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 975, in <listcomp>
    f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 982, in _json_schema_to_python_type
    f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 928, in _json_schema_to_python_type
    type_ = get_type(schema)
            ^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 887, 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 "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in __call__
    raise exc
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in __call__
    await self.app(scope, receive, _send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/route_utils.py", line 789, in __call__
    await self.app(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 714, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 734, in app
    await route.handle(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
    await self.app(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
    response = await f(request)
               ^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 37, in run_in_threadpool
    return await anyio.to_thread.run_sync(func)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/routes.py", line 553, in main
    gradio_api_info = api_info(request)
                      ^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/routes.py", line 583, in api_info
    api_info = utils.safe_deepcopy(app.get_blocks().get_api_info())
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/blocks.py", line 2994, in get_api_info
    python_type = client_utils.json_schema_to_python_type(info)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 920, in json_schema_to_python_type
    type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 974, in _json_schema_to_python_type
    des = [
          ^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 975, in <listcomp>
    f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 982, in _json_schema_to_python_type
    f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 928, in _json_schema_to_python_type
    type_ = get_type(schema)
            ^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 887, 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 "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/applications.py", line 112, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in __call__
    raise exc
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in __call__
    await self.app(scope, receive, _send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/route_utils.py", line 789, in __call__
    await self.app(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 714, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 734, in app
    await route.handle(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
    await self.app(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    raise exc
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
    response = await f(request)
               ^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 214, in run_endpoint_function
    return await run_in_threadpool(dependant.call, **values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/starlette/concurrency.py", line 37, in run_in_threadpool
    return await anyio.to_thread.run_sync(func)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2470, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/routes.py", line 553, in main
    gradio_api_info = api_info(request)
                      ^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/routes.py", line 583, in api_info
    api_info = utils.safe_deepcopy(app.get_blocks().get_api_info())
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/blocks.py", line 2994, in get_api_info
    python_type = client_utils.json_schema_to_python_type(info)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 920, in json_schema_to_python_type
    type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 974, in _json_schema_to_python_type
    des = [
          ^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 975, in <listcomp>
    f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 982, in _json_schema_to_python_type
    f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 928, in _json_schema_to_python_type
    type_ = get_type(schema)
            ^^^^^^^^^^^^^^^^
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio_client/utils.py", line 887, in get_type
    if "const" in schema:
       ^^^^^^^^^^^^^^^^^
TypeError: argument of type 'bool' is not iterable
Traceback (most recent call last):
  File "/Users/alex/www/Python/web-ui/webui.py", line 1148, in <module>
    main()
  File "/Users/alex/www/Python/web-ui/webui.py", line 1144, in main
    demo.launch(server_name=args.ip, server_port=args.port)
  File "/Users/alex/www/Python/web-ui/.venv/lib/python3.11/site-packages/gradio/blocks.py", line 2621, 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.
(web-ui)
$

Same thing logs in a infinite loop when I run docker compose up --build

macOS 15.3.2 No proxies

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 4
  • Comments: 16 (4 by maintainers)

Most upvoted comments

I got this same error, and i upgrade the gradio version to resolve this. run: uv pip install --upgrade gradio

uv pip install --upgrade gradio

Thanks @Codexiaoyi for the suggestion. It worked for me after upgrading the gradio.

I got the same issue for Windows as well for local installation. I have not tried for Docker installation. Any help ??

I got this same error, and i upgrade the gradio version to resolve this. run: uv pip install --upgrade gradio

Not sure higher version of gradio if will cause other issues, but you guys can also try this way

it seems that it is a pydantic version issue. try to use pydantic==2.10.6. that works for me.

Hi @vvincent1234 any idea on this ?