运行下列代码时发生了报错:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("moka-ai/m3e-base")
embeddings = model.encode(['Hello World!', '你好,世界!'])
报错信息如下:
Traceback (most recent call last):
File "D:\ANACONDA\envs\dream\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "D:\ANACONDA\envs\dream\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "D:\ANACONDA\envs\dream\lib\site-packages\urllib3\connectionpool.py", line 1040, in _validate_conn
conn.connect()
File "D:\ANACONDA\envs\dream\lib\site-packages\urllib3\connection.py", line 414, in connect
self.sock = ssl_wrapsocket(
File "D:\ANACONDA\envs\dream\lib\site-packages\urllib3\util\ssl.py", line 449, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socketimpl(
File "D:\ANACONDA\envs\dream\lib\site-packages\urllib3\util\ssl.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "D:\ANACONDA\envs\dream\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "D:\ANACONDA\envs\dream\lib\ssl.py", line 1040, in _create
self.do_handshake()
File "D:\ANACONDA\envs\dream\lib\ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。
🐛 bug 说明
运行下列代码时发生了报错: from sentence_transformers import SentenceTransformer
model = SentenceTransformer("moka-ai/m3e-base") embeddings = model.encode(['Hello World!', '你好,世界!'])
报错信息如下:
Traceback (most recent call last): File "D:\ANACONDA\envs\dream\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "D:\ANACONDA\envs\dream\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "D:\ANACONDA\envs\dream\lib\site-packages\urllib3\connectionpool.py", line 1040, in _validate_conn conn.connect() File "D:\ANACONDA\envs\dream\lib\site-packages\urllib3\connection.py", line 414, in connect self.sock = ssl_wrapsocket( File "D:\ANACONDA\envs\dream\lib\site-packages\urllib3\util\ssl.py", line 449, in ssl_wrap_socket ssl_sock = _ssl_wrap_socketimpl( File "D:\ANACONDA\envs\dream\lib\site-packages\urllib3\util\ssl.py", line 493, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "D:\ANACONDA\envs\dream\lib\ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "D:\ANACONDA\envs\dream\lib\ssl.py", line 1040, in _create self.do_handshake() File "D:\ANACONDA\envs\dream\lib\ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。
Python Version
None