OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Unknown scheme for proxy URL URL

Open zhipengzuo opened this issue 1 year ago • 2 comments

use proxy for terminal export http_proxy=socks5h://127.0.0.1:123 export https_proxy=socks5h://127.0.0.1:123 export all_proxy=socks5h://127.0.0.1:123

error log :

File "/Users/~/Documents/codes/AI/OpenDevin/opendevin/server/listen.py", line 4, in import litellm File "/Users/~/Library/Caches/pypoetry/virtualenvs/opendevin-eWtYTbaO-py3.11/lib/python3.11/site-packages/litellm/init.py", line 631, in from .main import * # type: ignore ^^^^^^^^^^^^^^^^^^^ File "/Users/~/Library/Caches/pypoetry/virtualenvs/opendevin-eWtYTbaO-py3.11/lib/python3.11/site-packages/litellm/main.py", line 101, in openai_text_completions = OpenAITextCompletion() ^^^^^^^^^^^^^^^^^^^^^^ File "/Users/~/Library/Caches/pypoetry/virtualenvs/opendevin-eWtYTbaO-py3.11/lib/python3.11/site-packages/litellm/llms/openai.py", line 993, in init self._client_session = self.create_client_session() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/~/Library/Caches/pypoetry/virtualenvs/opendevin-eWtYTbaO-py3.11/lib/python3.11/site-packages/litellm/llms/base.py", line 14, in create_client_session _client_session = httpx.Client() ^^^^^^^^^^^^^^ File "/Users/~/Library/Caches/pypoetry/virtualenvs/opendevin-eWtYTbaO-py3.11/lib/python3.11/site-packages/httpx/_client.py", line 683, in init proxy_map = self._get_proxy_map(proxies or proxy, allow_env_proxies) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/~/Library/Caches/pypoetry/virtualenvs/opendevin-eWtYTbaO-py3.11/lib/python3.11/site-packages/httpx/_client.py", line 217, in _get_proxy_map return { ^ File "/Users/~/Library/Caches/pypoetry/virtualenvs/opendevin-eWtYTbaO-py3.11/lib/python3.11/site-packages/httpx/_client.py", line 218, in key: None if url is None else Proxy(url=url) ^^^^^^^^^^^^^^ File "/Users/~/Library/Caches/pypoetry/virtualenvs/opendevin-eWtYTbaO-py3.11/lib/python3.11/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('socks5h://127.0.0.1:123') make: *** [start-backend] Error 1

zhipengzuo avatar Apr 12 '24 11:04 zhipengzuo

Install socksio package

SmartManoj avatar Apr 13 '24 09:04 SmartManoj

I'm not familiar with socks5h but happy to accept a PR here

rbren avatar Apr 15 '24 06:04 rbren

Closing this as inactive

rbren avatar May 02 '24 02:05 rbren