-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"ValueError: check_hostname requires server_hostname" when trying to update conda #10590
Comments
I also encountered the same problem,conda version : 4.10.1. |
This problem occurs when I connect to the VPN, and there is no problem without the VPN, but my download speed is slow. |
If you have set |
Thank you, this method is useful, it can be used with VPN now. |
Thank you, @WMQ1999 and @RengarWang ! Unfortunately, I still encounter an error:
|
@tykutar |
@RengarWang , thank you for your advice.
|
Eh...? what if after I set the proxy I can go smoothly with the prompt, but I still unable to use the Navigator (the same error, ValueError: check_hostname requires server_hostname). Before I set the proxy I even get error from the promt. |
I use VPN and encountered this bug. works fine to me. 🤣 Navigator Error
An unexpected error occurred on Navigator start-up
Report
Please report this issue in the anaconda issue tracker
Main Error
check_hostname requires server_hostname
Traceback
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\exceptions.py", line 72, in exception_handler
return_value = func(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\app\start.py", line 146, in start_app
window = run_app(splash)
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\app\start.py", line 65, in run_app
window = MainWindow(splash=splash)
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\widgets\main_window.py", line 165, in __init__
self.api = AnacondaAPI()
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\api\anaconda_api.py", line 1518, in AnacondaAPI
ANACONDA_API = _AnacondaAPI()
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\api\anaconda_api.py", line 83, in __init__
self._client_api = ClientAPI(config=self.config)
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\api\client_api.py", line 659, in ClientAPI
CLIENT_API = _ClientAPI(config=config)
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\api\client_api.py", line 95, in __init__
self.reload_client()
File "C:\ProgramData\Anaconda3\lib\site-packages\anaconda_navigator\api\client_api.py", line 326, in reload_client
client.user()
File "C:\ProgramData\Anaconda3\lib\site-packages\binstar_client\__init__.py", line 244, in user
res = self.session.get(url, verify=self.session.verify)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\adapters.py", line 439, in send
resp = conn.urlopen(
File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 696, in urlopen
self._prepare_proxy(conn)
File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 964, in _prepare_proxy
conn.connect()
File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\connection.py", line 359, in connect
conn = self._connect_tls_proxy(hostname, conn)
File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\connection.py", line 500, in _connect_tls_proxy
return ssl_wrap_socket(
File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\util\ssl_.py", line 432, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
File "C:\ProgramData\Anaconda3\lib\site-packages\urllib3\util\ssl_.py", line 474, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock)
File "C:\ProgramData\Anaconda3\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "C:\ProgramData\Anaconda3\lib\ssl.py", line 997, in _create
raise ValueError("check_hostname requires server_hostname")
ValueError: check_hostname requires server_hostname |
Thank you for all your help! |
I had the same problem, but I found out that the HTTP proxy setting in Pycharm was set to "No Proxy", and after I put in the setting of my proxy I can "pip install" within Pycharm without any issue. |
UpdateEDIT: 2023/03/18 核心解决思路为绕过 TLS in TLS 机制。
Solution请尝试按顺序执行如下操作解决此问题:
[注意] 若您使用 PyCharm 编辑工程,请在设置中关闭代理。Pycharm 中的代理设置仅对软件本身有效,如插件商店,而诸如通过 conda 创建 python 虚拟环境等操作是通过 shell 实现的,这些流量走系统代理。 Analysis此部分涉及到的网络通信较为复杂,玩家可能在任何意想不到的场景遇到此报错。 根据栈底上下文判断,个人认为 ValueError 是由 此外,这对中国大陆的开发者来说是一个 因此,对于国内用户来说,使用不存在 Related Issues
对于国内用户来说,使用 若您按照 |
This solution (installing urllib3 == 1.25.8) solved my issue reported in: rkhal101/Web-Security-Academy-Series#3 |
I tried all methods mentioned above but couldn't get it to work. I would still get 443 connection timeout in Pycharm or VSCode alike. |
用"localhost"而不是"127.0.0.1"就好了,也是奇怪 |
Thank you. |
thank you bro ! I solved my problem. |
only this works for me ~~ |
This one works for me. Thx |
Thank you very much!!! It solves my problem!!! It's important to install urllib3==1.25.11!!! |
This really works for me! |
close vpn will works |
Current Behavior
conda update conda
results inValueError: check_hostname requires server_hostname
conda install --revision [#]
results in the same error.Steps to Reproduce
Expected Behavior
conda update conda
worked normally prior to rev 9,so I'm guessing rev 9 has something to do with this error.
Any help is appreciated.
Environment Information
`conda info`
`conda config --show-sources`
`conda list --show-channel-urls`
The text was updated successfully, but these errors were encountered: