how can I solve this?
TwiceMao opened this issue · 5 comments
bug:
how can I solve this?
(imw) maomao@maomao415:~/Codes/image-matching-webui$ python ./app.py Traceback (most recent call last): File "/home/maomao/Codes/image-matching-webui/./app.py", line 2, in <module> import gradio as gr File "/home/maomao/anaconda3/envs/imw/lib/python3.10/site-packages/gradio/__init__.py", line 3, in <module> import gradio.components as components File "/home/maomao/anaconda3/envs/imw/lib/python3.10/site-packages/gradio/components/__init__.py", line 1, in <module> from gradio.components.annotated_image import AnnotatedImage File "/home/maomao/anaconda3/envs/imw/lib/python3.10/site-packages/gradio/components/annotated_image.py", line 12, in <module> from gradio import utils File "/home/maomao/anaconda3/envs/imw/lib/python3.10/site-packages/gradio/utils.py", line 353, in <module> class AsyncRequest: File "/home/maomao/anaconda3/envs/imw/lib/python3.10/site-packages/gradio/utils.py", line 372, in AsyncRequest client = httpx.AsyncClient() File "/home/maomao/anaconda3/envs/imw/lib/python3.10/site-packages/httpx/_client.py", line 1395, in __init__ proxy_map = self._get_proxy_map(proxies, allow_env_proxies) File "/home/maomao/anaconda3/envs/imw/lib/python3.10/site-packages/httpx/_client.py", line 216, in _get_proxy_map return { File "/home/maomao/anaconda3/envs/imw/lib/python3.10/site-packages/httpx/_client.py", line 217, in <dictcomp> key: None if url is None else Proxy(url=url) File "/home/maomao/anaconda3/envs/imw/lib/python3.10/site-packages/httpx/_config.py", line 336, in __init__ raise ValueError(f"Unknown scheme for proxy URL {url!r}") ValueError: Unknown scheme for proxy URL URL('socks://127.0.0.1:7891/')
You can try to close the network proxy in the system settings and restart a new terminal to run python app.py
unset all_proxy & unset ALL_PROXY can solve this problem
unset all_proxy & unset ALL_PROXY can solve this problem
Using this method does not make the code run successfully, in my case
You can try to close the network proxy in the system settings and restart a new terminal to run
python app.py
If I turn off the proxy in the system settings, I will lose network contact with the outside world and cannot continue to download the data and third-party libraries required for successful operation after running ./app.py.
You can try to download the models manually and put them in corresponding folders with the proxy open, then run app.py
without the proxy.