-
Notifications
You must be signed in to change notification settings - Fork 198
Open
Description
Description:
I'm encountering a TypeError
when using Gradio in my FastAPI app. The error occurs when calling get_api_info()
on a Blocks
instance. It seems that the library is attempting to iterate over a boolean instead of a dictionary in the JSON schema.
Stack Trace:
File "gradio_client/utils.py", line 866, in get_type
if "const" in schema:
TypeError: argument of type 'bool' is not iterable
Full traceback:
Click to expand
ERROR: Exception in ASGI application
Traceback (most recent call last):
...
File "gradio/routes.py", line 398, in api_info
app.api_info = app.get_blocks().get_api_info()
File "gradio/blocks.py", line 2535, in get_api_info
python_type = client_utils.json_schema_to_python_type(info)
File "gradio_client/utils.py", line 896, in json_schema_to_python_type
type_ = _json_schema_to_python_type(schema, schema.get("$defs"))
...
File "gradio_client/utils.py", line 866, in get_type
if "const" in schema:
TypeError: argument of type 'bool' is not iterable
Environment:
- OS: Ubuntu 20.04
- Python: 3.10
- Firebase Studio VPS
Steps to Reproduce:
- Run ./run.sh
- Go to website
- Press "Step 1 -Load viXTTS model"
Expected Behavior:
Model loading progress start.
Metadata
Metadata
Assignees
Labels
No labels