我将训练结果的指标记录在 wandb 在线服务器上。这工作没有任何问题,直到本周初。从那以后,我突然无法连接到 wandb 在线服务器并登录,指标不再起作用。我在 Windows 10 上使用 PyCharm 和 python 版本 3.8。
抛出以下异常:
Traceback (most recent call last):
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\urllib3\connectionpool.py", line 696, in urlopen
self._prepare_proxy(conn)
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\urllib3\connectionpool.py", line 964, in _prepare_proxy
conn.connect()
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\urllib3\connection.py", line 364, in connect
conn = self._connect_tls_proxy(hostname, conn)
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\urllib3\connection.py", line 501, in _connect_tls_proxy
socket = ssl_wrap_socket(
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\urllib3\util\ssl_.py", line 453, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\urllib3\util\ssl_.py", line 495, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock)
File "C:\Users\Miniconda3\envs\smartvision\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "C:\Users\Miniconda3\envs\smartvision\lib\ssl.py", line 1040, in _create
self.do_handshake()
File "C:\Users\Miniconda3\envs\smartvision\lib\ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1131)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\requests\adapters.py", line 439, in send
resp = conn.urlopen(
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\urllib3\util\retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.wandb.ai', port=443): Max retries exceeded with url: /graphql (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1131)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\wandb\sdk\lib\retry.py", line 102, in __call__
result = self._call_fn(*args, **kwargs)
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\wandb\sdk\internal\internal_api.py", line 132, in execute
return self.client.execute(*args, **kwargs)
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\wandb\vendor\gql-0.2.0\gql\client.py", line 52, in execute
result = self._get_result(document, *args, **kwargs)
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\wandb\vendor\gql-0.2.0\gql\client.py", line 60, in _get_result
return self.transport.execute(document, *args, **kwargs)
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\wandb\vendor\gql-0.2.0\gql\transport\requests.py", line 38, in execute
request = requests.post(self.url, **post_args)
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\requests\api.py", line 117, in post
return request('post', url, data=data, json=json, **kwargs)
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "C:\Users\Miniconda3\envs\smartvision\lib\site-packages\requests\adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.wandb.ai', port=443): Max retries exceeded with url: /graphql (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1131)')))
wandb: Network error (SSLError), entering retry loop.
wandb: W&B API key is configured (use `wandb login --relogin` to force relogin)
wandb: Network error (SSLError), entering retry loop.
奇怪的是,如果我将 pycharm 中使用的运行配置作为命令从它内置的终端执行,它工作正常。由于在内置终端上使用了相同的虚拟环境,我不明白为什么在 Pycharm 中使用运行配置会引发此异常。我在这里想念什么?
任何帮助,将不胜感激。