Problem while deploying the app on Hugging Face spaces
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 ?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'
2023-11-21T23:27:49Z
hi@5m4ck3rcan you please try it again adding apre-requirements.txttext file withpip==23.3.1?
2023-11-22T08:48:56Z
Nop its not workingbut when i addos.system("pip uninstall -y gradio")
os.system("pip install gradio==2.6.4")Then its working fine …
2023-12-07T05:38:26Z
Can you please try to addgradio==3.45.0in requirements.txt?It’s working fine…
2024-01-04T23:00:22Z
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.