# Space: AttributeError: module 'gradio' has no attribute 'Sidebar'

**URL:** <https://discuss.huggingface.co/t/space-attributeerror-module-gradio-has-no-attribute-sidebar/148236>\
**Category:** Beginners\
**Created:** [March 31, 2025, 4:00pm UTC](https://discuss.huggingface.co/t/space-attributeerror-module-gradio-has-no-attribute-sidebar/148236 "2025-03-31T16:00:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![n094t23g](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@n094t23g](https://discuss.huggingface.co/u/n094t23g)\
**Post date:** [March 31, 2025, 4:00pm UTC](https://discuss.huggingface.co/t/space-attributeerror-module-gradio-has-no-attribute-sidebar/148236/1 "2025-03-31T16:00:14Z")

</div>

I have this error when I trying to build my space:

===== Application Startup at 2025-03-31 15:51:38 =====

Traceback (most recent call last):  
File “/home/user/app/app.py”, line 95, in   
GradioUI(agent).launch()  
File “/usr/local/lib/python3.10/site-packages/smolagents/gradio\_ui.py”, line 265, in launch  
with gr.Sidebar():  
AttributeError: module ‘gradio’ has no attribute ‘Sidebar’  
Traceback (most recent call last):  
File “/home/user/app/app.py”, line 95, in   
GradioUI(agent).launch()  
File “/usr/local/lib/python3.10/site-packages/smolagents/gradio\_ui.py”, line 265, in launch  
with gr.Sidebar():  
AttributeError: module ‘gradio’ has no attribute ‘Sidebar’

my requirement.txt:

huggingface\_hub\>=0.28.0

smolagents\>=1.12.0

python-dotenv==1.1.0

sqlalchemy==2.0.40

gradio\>=5.23.1

I am trying to build my first agents system. but this gradio error kept persisting. What could i have gone wrong here?

---

<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, 4:03pm UTC](https://discuss.huggingface.co/t/space-attributeerror-module-gradio-has-no-attribute-sidebar/148236/2 "2025-03-31T16:03:11Z")

</div>

At least, the Gradio version of **README.md** takes precedence over **requirements.txt** with regard to the GUI, so it is possible that it is out of date.

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

> sdk\_version: 5.15.0

---

<div class="post-metadata">

**Author:** ![n094t23g](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@n094t23g](https://discuss.huggingface.co/u/n094t23g)\
**Post date:** [March 31, 2025, 11:42pm UTC](https://discuss.huggingface.co/t/space-attributeerror-module-gradio-has-no-attribute-sidebar/148236/3 "2025-03-31T23:42:09Z")

</div>

Thanks for the correct direction, I changed it to 5.15 but it threw some errors so I put it to 5.23.2

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](https://discuss.huggingface.co/u/system)\
**Post date:** [April 1, 2025, 11:42am UTC](https://discuss.huggingface.co/t/space-attributeerror-module-gradio-has-no-attribute-sidebar/148236/4 "2025-04-01T11:42:28Z")

</div>

Closed on April 1, 2025, 11:42am UTC

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
