# Problem while deploying the app on Hugging Face spaces

**URL:** <https://discuss.huggingface.co/t/problem-while-deploying-the-app-on-hugging-face-spaces/62999>\
**Category:** Spaces\
**Created:** [November 21, 2023, 10:34am UTC](https://discuss.huggingface.co/t/problem-while-deploying-the-app-on-hugging-face-spaces/62999 "2023-11-21T10:34:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![5m4ck3r](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/5m4ck3r/32/40374_2.png) [@5m4ck3r](https://discuss.huggingface.co/u/5m4ck3r)\
**Post date:** [November 21, 2023, 10:34am UTC](https://discuss.huggingface.co/t/problem-while-deploying-the-app-on-hugging-face-spaces/62999/1 "2023-11-21T10:34:04Z")

</div>

Hi currently i am trying to deploy an app in the hugging face space but i am getting this error any suggestion how to solve it ?

i already have updated gradio and httpx but still error is same ?

```auto
Traceback (most recent call last):
  File "/home/user/app/app.py", line 4, in <module>
    import gradio as gr
  File "/home/user/.local/lib/python3.10/site-packages/gradio/ __init__.py", line 3, in <module>
    import gradio.components as components
  File "/home/user/.local/lib/python3.10/site-packages/gradio/components.py", line 39, in <module>
    from gradio.blocks import Block
  File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 19, in <module>
    from gradio import (
  File "/home/user/.local/lib/python3.10/site-packages/gradio/event_queue.py", line 11, in <module>
    from gradio.utils import Request, run_coro_in_background
  File "/home/user/.local/lib/python3.10/site-packages/gradio/utils.py", line 384, in <module>
    class Request:
  File "/home/user/.local/lib/python3.10/site-packages/gradio/utils.py", line 404, in Request
    client = httpx.AsyncClient()
  File "/home/user/.local/lib/python3.10/site-packages/httpx/_client.py", line 1397, in __init__
    self._transport = self._init_transport(
  File "/home/user/.local/lib/python3.10/site-packages/httpx/_client.py", line 1445, in _init_transport
    return AsyncHTTPTransport(
  File "/home/user/.local/lib/python3.10/site-packages/httpx/_transports/default.py", line 275, in __init__
    self._pool = httpcore.AsyncConnectionPool(
TypeError: AsyncConnectionPool. __init__ () got an unexpected keyword argument 'socket_options'

```

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](https://discuss.huggingface.co/u/radames)\
**Post date:** [November 21, 2023, 11:27pm UTC](https://discuss.huggingface.co/t/problem-while-deploying-the-app-on-hugging-face-spaces/62999/2 "2023-11-21T23:27:49Z")

</div>

hi @5m4ck3r can you please try it again adding a `pre-requirements.txt` text file with `pip==23.3.1`?

---

<div class="post-metadata">

**Author:** ![5m4ck3r](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/5m4ck3r/32/40374_2.png) [@5m4ck3r](https://discuss.huggingface.co/u/5m4ck3r)\
**Post date:** [November 22, 2023, 8:48am UTC](https://discuss.huggingface.co/t/problem-while-deploying-the-app-on-hugging-face-spaces/62999/3 "2023-11-22T08:48:56Z")

</div>

Nop its not working ☹ but when i add

```auto
os.system("pip uninstall -y gradio")
os.system("pip install gradio==2.6.4")

```

Then its working fine …

---

<div class="post-metadata">

**Author:** ![henrykohl](https://avatars.discourse-cdn.com/v4/letter/h/ecccb3/32.png) [@henrykohl](https://discuss.huggingface.co/u/henrykohl)\
**Post date:** [December 7, 2023, 5:38am UTC](https://discuss.huggingface.co/t/problem-while-deploying-the-app-on-hugging-face-spaces/62999/4 "2023-12-07T05:38:26Z")

</div>

Can you please try to add

```auto
gradio==3.45.0

```

in requirements.txt?  
It’s working fine…

---

<div class="post-metadata">

**Author:** ![CK42](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@CK42](https://discuss.huggingface.co/u/CK42)\
**Post date:** [January 4, 2024, 11:00pm UTC](https://discuss.huggingface.co/t/problem-while-deploying-the-app-on-hugging-face-spaces/62999/5 "2024-01-04T23:00:22Z")

</div>

I had a similar problem and this didn’t work for me. For my situation I removed my hard coded Gradio version (3.1.4?) and left the default (version 4.12.0). I also changed my python from version 3.9.13 to 3.9.17. This worked for me.

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](https://discuss.huggingface.co/u/radames)\
**Post date:** [January 10, 2024, 8:49pm UTC](https://discuss.huggingface.co/t/problem-while-deploying-the-app-on-hugging-face-spaces/62999/6 "2024-01-10T20:49:35Z")

</div>

Closed on January 10, 2024, 8:49pm UTC


