After duplicating the space First Agent Template - a Hugging Face Space by agents-course,
I get this blocking exception at startup:
File “/usr/local/lib/python3.10/site-packages/gradio_client/utils.py”, line 898, in get_type
if “const” in schema:
TypeError: argument of type ‘bool’ is not iterable
Do you have any idea what might be causing this error during startup?
The same phenomenon has been reported on HF Discord, and I have also confirmed it. For the time being, you can avoid it by updating the version of Gradio to the latest version, but I think it is probably some kind of bug in Hugging Face.
sdk_version: 5.23.1
Have the same problem here. I tried to go into the requirements.txt fileand added the line ‘gradio= 5.23.3’ but still got the same error as ame2171 did
File “/usr/local/lib/python3.10/site-packages/gradio_client/utils.py”, line 898, in get_type
if “const” in schema:
TypeError: argument of type ‘bool’ is not iterable
Anyone else manage to fix this ? super annoying as literally this is the first baby step in the course but getting stuck because it won’t run
requirements.txt fileand added the line ‘gradio= 5.23.3’
You need to modify README.md.
In the case of the Gradio space, you don’t need to set up Gradio in the requirements.txt file, because the settings in the README.md file are given relatively high priority in Hugging Face Spaces.
…but it seems that even the latest version of Gradio will generate an error if you try to restart it…
It seems to work with 5.23.1 (not 5.23.3), but it may be related to the pydantic issue below.
pydantic==2.10.6
thank you ! you were right. Updating the README.md to sdk_version: 5.23.1 (NOT the latest 5.23.3 as the prompt recommended) seems to have done the trick. Hopefully this helps other newbies too