# Agent Course - First Agent Template

**URL:** <https://discuss.huggingface.co/t/agent-course-first-agent-template/148170>\
**Category:** Beginners\
**Created:** [March 31, 2025, 9:12am UTC](https://discuss.huggingface.co/t/agent-course-first-agent-template/148170 "2025-03-31T09:12:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ame2171](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@ame2171](https://discuss.huggingface.co/u/ame2171)\
**Post date:** [March 31, 2025, 9:12am UTC](https://discuss.huggingface.co/t/agent-course-first-agent-template/148170/1 "2025-03-31T09:12:30Z")

</div>

After duplicating the space [First Agent Template - a Hugging Face Space by agents-course](https://huggingface.co/spaces/agents-course/First_agent_template),  
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?

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [March 31, 2025, 11:04am UTC](https://discuss.huggingface.co/t/agent-course-first-agent-template/148170/2 "2025-03-31T11:04:26Z")

</div>

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.

> [@Error: agent course](https://discuss.huggingface.co/t/error-agent-course/147345):
>
> I get an error then Duplicating space: To create a public link, set share=True in launch(). choose: public I need help, guys!!!

> **[README.md · agents-course/First\_agent\_template at main](https://huggingface.co/spaces/agents-course/First_agent_template/blob/main/README.md)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

```yaml
sdk_version: 5.23.1

```

---

<div class="post-metadata">

**Author:** ![zhijingeu](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/zhijingeu/32/44781_2.png) [@zhijingeu](https://discuss.huggingface.co/u/zhijingeu)\
**Post date:** [April 4, 2025, 2:02pm UTC](https://discuss.huggingface.co/t/agent-course-first-agent-template/148170/3 "2025-04-04T14:02:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [April 4, 2025, 2:20pm UTC](https://discuss.huggingface.co/t/agent-course-first-agent-template/148170/4 "2025-04-04T14:20:07Z")

</div>

> 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.

> **[Spaces Configuration Reference](https://huggingface.co/docs/hub/spaces-config-reference)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [April 4, 2025, 2:25pm UTC](https://discuss.huggingface.co/t/agent-course-first-agent-template/148170/5 "2025-04-04T14:25:32Z")

</div>

…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.

> [@Error : No API Found](https://discuss.huggingface.co/t/error-no-api-found/146226):
>
> Hi, I have built a Gemini 2.0 flash based photo editing app with gradio ui. This app is running perfectly fine on my local system, but when I am trying to run it on spaces it is giving me Error : No API Found. I have used gemini api keys in secrects Code : [https://huggingface.co/spaces/Saurabh502/Gemini-photo/resolve/main/app.py](https://huggingface.co/spaces/Saurabh502/Gemini-photo/resolve/main/app.py) Please let me know your thoughts, on how to resolve this. Thanks

> pydantic==2.10.6

---

<div class="post-metadata">

**Author:** ![zhijingeu](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/zhijingeu/32/44781_2.png) [@zhijingeu](https://discuss.huggingface.co/u/zhijingeu)\
**Post date:** [April 4, 2025, 2:38pm UTC](https://discuss.huggingface.co/t/agent-course-first-agent-template/148170/6 "2025-04-04T14:38:53Z")

</div>

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 🙂
