Hi -I've been trying to get this 'NIM Anywhere' project to run via NVIDIA Ai Workbench, and I get all of these started and all seem to be running fine:
Compose
RUNNING
milvus | RUNNING
redis | RUNNING
Project Container
RUNNING
Applications
VS Code
Chat Frontend
RUNNING
Chain Server
RUNNING
Tutorial
RUNNING
JupyterLab
RUNNING
But when I click on 'Open Chat Frontend' I get a double column page in my browser, where both columns are identical, and say:
500 Server Error TypeError: argument of type 'bool' is not iterable
And under that is this long 'Traceback' that I have posted below. Can anyone tell me what is wrong here? As I haven't edited the files or anything. And the tutorial in this works ok I guess - though it doesn't seem like much of a tutorial at all. And I can't find any info regarding this particular error for the NIM Anywhere container. If anyone can please help me it would be GREATLY APPRECIATED !
Thanks in advance for any replies!
-patrick
traceback posted below:
Traceback
File /home/workbench/.local/lib/python3.10/site-packages/gradio_client/utils.py, line 887, in get_type ‒
-
def get_type(schema: dict):
-
-
-
-
File /home/workbench/.local/lib/python3.10/site-packages/gradio_client/utils.py, line 928, in _json_schema_to_python_type ‒
-
"""Convert the json schema into a python type hint"""
-
-
-
-
-
if "json" in schema.get("description", {}):
-
return "str | float | bool | list | dict"
File /home/workbench/.local/lib/python3.10/site-packages/gradio_client/utils.py, line 982, in _json_schema_to_python_type ‒
-
if "additionalProperties" in schema:
-
-
f"str, {_json_schema_to_python_type(schema['additionalProperties'], defs)}"
-
-
-
File /home/workbench/.local/lib/python3.10/site-packages/gradio_client/utils.py, line 975, in ‒
-
props = schema.get("properties", {})
-
-
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
-
for n, v in props.items()
-
-
File /home/workbench/.local/lib/python3.10/site-packages/gradio_client/utils.py, line 974, in _json_schema_to_python_type ‒
-
props = schema.get("properties", {})
-
-
f"{n}: {_json_schema_to_python_type(v, defs)}{get_desc(v)}"
-
for n, v in props.items()
-
File /home/workbench/.local/lib/python3.10/site-packages/gradio_client/utils.py, line 935, in _json_schema_to_python_type ‒
-
-
-
-
return _json_schema_to_python_type(defs[schema["$ref"].split("/")[-1]], defs)
-
-
-
File /home/workbench/.local/lib/python3.10/site-packages/gradio_client/utils.py, line 965, in _json_schema_to_python_type ‒
-
-
return f"tuple[{elements}]"
-
-
elements = _json_schema_to_python_type(items, defs)
-
return f"list[{elements}]"
-
File /home/workbench/.local/lib/python3.10/site-packages/gradio_client/utils.py, line 920, in json_schema_to_python_type ‒
-
def json_schema_to_python_type(schema: Any) -> str:
-
type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
-
return type_.replace(CURRENT_FILE_DATA_FORMAT, "filepath")
File /home/workbench/.local/lib/python3.10/site-packages/gradio/blocks.py, line 2925, in get_api_info ‒
-
raise TypeError(f"{comp!r} is not a Component")
-
info = component.get("api_info_as_input", component.get("api_info"))
-
example = comp.example_inputs()
-
python_type = client_utils.json_schema_to_python_type(info)
-
# Since the clients use "api_name" and "fn_index" to designate the endpoint and
-
# "result_callbacks" to specify the callbacks, we need to make sure that no parameters
File /home/workbench/.local/lib/python3.10/site-packages/gradio/routes.py, line 582, in api_info ‒
-
app.all_app_info = app.get_blocks().get_api_info(all_endpoints=True)
-
-
-
api_info = utils.safe_deepcopy(app.get_blocks().get_api_info())
-
api_info = cast(dict[str, Any], api_info)
-
api_info = route_utils.update_example_values_to_use_public_url(api_info)
-
File /home/workbench/.local/lib/python3.10/site-packages/gradio/routes.py, line 552, in main ‒
-
-
"frontend/share.html" if blocks.share else "frontend/index.html"
-
-
gradio_api_info = api_info(request)
-
return templates.TemplateResponse(
-
-
File /usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py, line 962, in run ‒
-
exception: BaseException | None = None
-
threadlocals.current_cancel_scope = cancel_scope
-
-
result = context.run(func, *args)
-
except BaseException as exc:
-
-
File /usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py, line 2461, in run_sync_in_worker_thread ‒
-
worker_scope = scope._parent_scope
-
worker.queue.put_nowait((context, func, args, future, worker_scope))
-
-
-
def check_cancelled(cls) -> None:
File /usr/local/lib/python3.10/dist-packages/anyio/to_thread.py, line 56, in run_sync ‒
-
-
-
return await get_async_backend().run_sync_in_worker_thread(
-
func, args, abandon_on_cancel=abandon_on_cancel, limiter=limiter
-
File /home/workbench/.local/lib/python3.10/site-packages/starlette/concurrency.py, line 39, in run_in_threadpool ‒
-
if kwargs: # pragma: no cover
-
# run_sync doesn't accept 'kwargs', so bind them in here
-
func = functools.partial(func, **kwargs)
-
return await anyio.to_thread.run_sync(func, *args)
-
class _StopIteration(Exception):
File /home/workbench/.local/lib/python3.10/site-packages/fastapi/routing.py, line 214, in run_endpoint_function ‒
-
-
return await dependant.call(**values)
-
-
return await run_in_threadpool(dependant.call, **values)
-
def get_request_handler(
File /home/workbench/.local/lib/python3.10/site-packages/fastapi/routing.py, line 301, in app ‒
-
-
errors = solved_result.errors
-
-
raw_response = await run_endpoint_function(
-
-
values=solved_result.values,
-
is_coroutine=is_coroutine,
File /home/workbench/.local/lib/python3.10/site-packages/starlette/routing.py, line 73, in app ‒
-
request = Request(scope, receive, send)
-
async def app(scope: Scope, receive: Receive, send: Send) -> None:
-
response = await f(request)
-
await response(scope, receive, send)
-
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File /home/workbench/.local/lib/python3.10/site-packages/starlette/_exception_handler.py, line 42, in wrapped_app ‒
-
-
-
await app(scope, receive, sender)
-
-
File /home/workbench/.local/lib/python3.10/site-packages/starlette/_exception_handler.py, line 53, in wrapped_app ‒
-
handler = _lookup_exception_handler(exception_handlers, exc)
-
-
-
-
raise RuntimeError("Caught handled exception, but response already started.") from exc
File /home/workbench/.local/lib/python3.10/site-packages/starlette/routing.py, line 76, in app ‒
-
response = await f(request)
-
await response(scope, receive, send)
-
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
-
File /home/workbench/.local/lib/python3.10/site-packages/starlette/routing.py, line 288, in handle ‒
-
response = PlainTextResponse("Method Not Allowed", status_code=405, headers=headers)
-
await response(scope, receive, send)
-
-
await self.app(scope, receive, send)
-
def __eq__(self, other: typing.Any) -> bool:
-
File /home/workbench/.local/lib/python3.10/site-packages/starlette/routing.py, line 735, in app ‒
-
match, child_scope = route.matches(scope)
-
-
scope.update(child_scope)
-
await route.handle(scope, receive, send)
-
-
elif match == Match.PARTIAL and partial is None:
-
File /home/workbench/.local/lib/python3.10/site-packages/starlette/_exception_handler.py, line 42, in wrapped_app +
-
-
-
await app(scope, receive, sender)
-
-
File /home/workbench/.local/lib/python3.10/site-packages/starlette/_exception_handler.py, line 53, in wrapped_app ‒
-
handler = _lookup_exception_handler(exception_handlers, exc)
-
-
-
-
raise RuntimeError("Caught handled exception, but response already started.") from exc
File /home/workbench/.local/lib/python3.10/site-packages/starlette/routing.py, line 715, in call ‒
-
-
The main entry point to the Router class.
-
-
await self.middleware_stack(scope, receive, send)
-
async def app(self, scope: Scope, receive: Receive, send: Send) -> None:
-
assert scope["type"] in ("http", "websocket", "lifespan")
File /home/workbench/.local/lib/python3.10/site-packages/starlette/middleware/exceptions.py, line 62, in call ‒
-
-
conn = WebSocket(scope, receive, send)
-
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
-
def http_exception(self, request: Request, exc: Exception) -> Response:
-
assert isinstance(exc, HTTPException)
File /home/workbench/.local/lib/python3.10/site-packages/gradio/route_utils.py, line 789, in call ‒
-
headers = Headers(scope=scope)
-
origin = headers.get("origin")
-
-
await self.app(scope, receive, send)
-
-
if scope["method"] == "OPTIONS" and "access-control-request-method" in headers:
-
response = self.preflight_response(request_headers=headers)
File /home/workbench/.local/lib/python3.10/site-packages/starlette/middleware/errors.py, line 165, in call ‒
-
-
-
await self.app(scope, receive, _send)
-
-
-
Hi -I've been trying to get this 'NIM Anywhere' project to run via NVIDIA Ai Workbench, and I get all of these started and all seem to be running fine:
Compose
RUNNING
milvus | RUNNING
redis | RUNNING
Project Container
RUNNING
Applications
VS Code
Chat Frontend
RUNNING
Chain Server
RUNNING
Tutorial
RUNNING
JupyterLab
RUNNING
But when I click on 'Open Chat Frontend' I get a double column page in my browser, where both columns are identical, and say:
500 Server Error TypeError: argument of type 'bool' is not iterable
And under that is this long 'Traceback' that I have posted below. Can anyone tell me what is wrong here? As I haven't edited the files or anything. And the tutorial in this works ok I guess - though it doesn't seem like much of a tutorial at all. And I can't find any info regarding this particular error for the NIM Anywhere container. If anyone can please help me it would be GREATLY APPRECIATED !
Thanks in advance for any replies!
-patrick
traceback posted below:
Traceback
File /home/workbench/.local/lib/python3.10/site-packages/gradio_client/utils.py, line 887, in get_type ‒
def get_type(schema: dict):
File /home/workbench/.local/lib/python3.10/site-packages/gradio_client/utils.py, line 928, in _json_schema_to_python_type ‒
File /home/workbench/.local/lib/python3.10/site-packages/gradio_client/utils.py, line 982, in _json_schema_to_python_type ‒
File /home/workbench/.local/lib/python3.10/site-packages/gradio_client/utils.py, line 975, in ‒
File /home/workbench/.local/lib/python3.10/site-packages/gradio_client/utils.py, line 974, in _json_schema_to_python_type ‒
File /home/workbench/.local/lib/python3.10/site-packages/gradio_client/utils.py, line 935, in _json_schema_to_python_type ‒
File /home/workbench/.local/lib/python3.10/site-packages/gradio_client/utils.py, line 965, in _json_schema_to_python_type ‒
File /home/workbench/.local/lib/python3.10/site-packages/gradio_client/utils.py, line 920, in json_schema_to_python_type ‒
def json_schema_to_python_type(schema: Any) -> str:
File /home/workbench/.local/lib/python3.10/site-packages/gradio/blocks.py, line 2925, in get_api_info ‒
File /home/workbench/.local/lib/python3.10/site-packages/gradio/routes.py, line 582, in api_info ‒
File /home/workbench/.local/lib/python3.10/site-packages/gradio/routes.py, line 552, in main ‒
File /usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py, line 962, in run ‒
File /usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py, line 2461, in run_sync_in_worker_thread ‒
File /usr/local/lib/python3.10/dist-packages/anyio/to_thread.py, line 56, in run_sync ‒
File /home/workbench/.local/lib/python3.10/site-packages/starlette/concurrency.py, line 39, in run_in_threadpool ‒
class _StopIteration(Exception):
File /home/workbench/.local/lib/python3.10/site-packages/fastapi/routing.py, line 214, in run_endpoint_function ‒
def get_request_handler(
File /home/workbench/.local/lib/python3.10/site-packages/fastapi/routing.py, line 301, in app ‒
File /home/workbench/.local/lib/python3.10/site-packages/starlette/routing.py, line 73, in app ‒
File /home/workbench/.local/lib/python3.10/site-packages/starlette/_exception_handler.py, line 42, in wrapped_app ‒
File /home/workbench/.local/lib/python3.10/site-packages/starlette/_exception_handler.py, line 53, in wrapped_app ‒
File /home/workbench/.local/lib/python3.10/site-packages/starlette/routing.py, line 76, in app ‒
File /home/workbench/.local/lib/python3.10/site-packages/starlette/routing.py, line 288, in handle ‒
File /home/workbench/.local/lib/python3.10/site-packages/starlette/routing.py, line 735, in app ‒
File /home/workbench/.local/lib/python3.10/site-packages/starlette/_exception_handler.py, line 42, in wrapped_app +
File /home/workbench/.local/lib/python3.10/site-packages/starlette/_exception_handler.py, line 53, in wrapped_app ‒
File /home/workbench/.local/lib/python3.10/site-packages/starlette/routing.py, line 715, in call ‒
File /home/workbench/.local/lib/python3.10/site-packages/starlette/middleware/exceptions.py, line 62, in call ‒
File /home/workbench/.local/lib/python3.10/site-packages/gradio/route_utils.py, line 789, in call ‒
File /home/workbench/.local/lib/python3.10/site-packages/starlette/middleware/errors.py, line 165, in call ‒