AGI2406期 AI模拟面试机器人实战练习(上) #699

Open
opened 2025-04-18 18:54:52 +08:00 by xgs · 1 comment

TTS模型部分
模型已经下载, jupyternotebook代码运行错误是什么原因?


OSError Traceback (most recent call last)
File ~/miniconda3/envs/tts2/lib/python3.8/site-packages/urllib3/connection.py:199, in HTTPConnection._new_conn(self)
198 try:
--> 199 sock = connection.create_connection(
200 (self._dns_host, self.port),
201 self.timeout,
202 source_address=self.source_address,
203 socket_options=self.socket_options,
204 )
205 except socket.gaierror as e:

File ~/miniconda3/envs/tts2/lib/python3.8/site-packages/urllib3/util/connection.py:85, in create_connection(address, timeout, source_address, socket_options)
84 try:
---> 85 raise err
86 finally:
87 # Break explicitly a reference cycle

File ~/miniconda3/envs/tts2/lib/python3.8/site-packages/urllib3/util/connection.py:73, in create_connection(address, timeout, source_address, socket_options)
72 sock.bind(source_address)
---> 73 sock.connect(sa)
74 # Break explicitly a reference cycle

OSError: [Errno 101] Network is unreachable

The above exception was the direct cause of the following exception:

NewConnectionError Traceback (most recent call last)
File ~/miniconda3/envs/tts2/lib/python3.8/site-packages/urllib3/connectionpool.py:789, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, preload_content, decode_content, **response_kw)
788 # Make the request on the HTTPConnection object
--> 789 response = self._make_request(
790 conn,
791 method,
792 url,
793 timeout=timeout_obj,
794 body=body,
795 headers=headers,
796 chunked=chunked,
797 retries=retries,
798 response_conn=response_conn,
799 preload_content=preload_content,
800 decode_content=decode_content,
801 **response_kw,
802 )
804 # Everything went great!

File ~/miniconda3/envs/tts2/lib/python3.8/site-packages/urllib3/connectionpool.py:490, in HTTPConnectionPool._make_request(self, conn, method, url, body, headers, retries, timeout, chunked, response_conn, preload_content, decode_content, enforce_content_length)
489 new_e = _wrap_proxy_error(new_e, conn.proxy.scheme)
--> 490 raise new_e
492 # conn.request() calls http.client.*.request, not the method in
493 # urllib3.request. It also calls makefile (recv) on the socket.

File ~/miniconda3/envs/tts2/lib/python3.8/site-packages/urllib3/connectionpool.py:466, in HTTPConnectionPool._make_request(self, conn, method, url, body, headers, retries, timeout, chunked, response_conn, preload_content, decode_content, enforce_content_length)
465 try:
--> 466 self._validate_conn(conn)
467 except (SocketTimeout, BaseSSLError) as e:

File ~/miniconda3/envs/tts2/lib/python3.8/site-packages/urllib3/connectionpool.py:1095, in HTTPSConnectionPool._validate_conn(self, conn)
1094 if conn.is_closed:
-> 1095 conn.connect()
1097 # TODO revise this, see https://github.com/urllib3/urllib3/issues/2791

File ~/miniconda3/envs/tts2/lib/python3.8/site-packages/urllib3/connection.py:693, in HTTPSConnection.connect(self)
692 sock: socket.socket | ssl.SSLSocket
--> 693 self.sock = sock = self._new_conn()
694 server_hostname: str = self.host

File ~/miniconda3/envs/tts2/lib/python3.8/site-packages/urllib3/connection.py:214, in HTTPConnection._new_conn(self)
213 except OSError as e:
--> 214 raise NewConnectionError(
215 self, f"Failed to establish a new connection: {e}"
216 ) from e
218 # Audit hooks are only available in Python 3.8+

NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f1350262370>: Failed to establish a new connection: [Errno 101] Network is unreachable

The above exception was the direct cause of the following exception:
image

TTS模型部分 模型已经下载, jupyternotebook代码运行错误是什么原因? --------------------------------------------------------------------------- OSError Traceback (most recent call last) File ~/miniconda3/envs/tts2/lib/python3.8/site-packages/urllib3/connection.py:199, in HTTPConnection._new_conn(self) 198 try: --> 199 sock = connection.create_connection( 200 (self._dns_host, self.port), 201 self.timeout, 202 source_address=self.source_address, 203 socket_options=self.socket_options, 204 ) 205 except socket.gaierror as e: File ~/miniconda3/envs/tts2/lib/python3.8/site-packages/urllib3/util/connection.py:85, in create_connection(address, timeout, source_address, socket_options) 84 try: ---> 85 raise err 86 finally: 87 # Break explicitly a reference cycle File ~/miniconda3/envs/tts2/lib/python3.8/site-packages/urllib3/util/connection.py:73, in create_connection(address, timeout, source_address, socket_options) 72 sock.bind(source_address) ---> 73 sock.connect(sa) 74 # Break explicitly a reference cycle OSError: [Errno 101] Network is unreachable The above exception was the direct cause of the following exception: NewConnectionError Traceback (most recent call last) File ~/miniconda3/envs/tts2/lib/python3.8/site-packages/urllib3/connectionpool.py:789, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, preload_content, decode_content, **response_kw) 788 # Make the request on the HTTPConnection object --> 789 response = self._make_request( 790 conn, 791 method, 792 url, 793 timeout=timeout_obj, 794 body=body, 795 headers=headers, 796 chunked=chunked, 797 retries=retries, 798 response_conn=response_conn, 799 preload_content=preload_content, 800 decode_content=decode_content, 801 **response_kw, 802 ) 804 # Everything went great! File ~/miniconda3/envs/tts2/lib/python3.8/site-packages/urllib3/connectionpool.py:490, in HTTPConnectionPool._make_request(self, conn, method, url, body, headers, retries, timeout, chunked, response_conn, preload_content, decode_content, enforce_content_length) 489 new_e = _wrap_proxy_error(new_e, conn.proxy.scheme) --> 490 raise new_e 492 # conn.request() calls http.client.*.request, not the method in 493 # urllib3.request. It also calls makefile (recv) on the socket. File ~/miniconda3/envs/tts2/lib/python3.8/site-packages/urllib3/connectionpool.py:466, in HTTPConnectionPool._make_request(self, conn, method, url, body, headers, retries, timeout, chunked, response_conn, preload_content, decode_content, enforce_content_length) 465 try: --> 466 self._validate_conn(conn) 467 except (SocketTimeout, BaseSSLError) as e: File ~/miniconda3/envs/tts2/lib/python3.8/site-packages/urllib3/connectionpool.py:1095, in HTTPSConnectionPool._validate_conn(self, conn) 1094 if conn.is_closed: -> 1095 conn.connect() 1097 # TODO revise this, see https://github.com/urllib3/urllib3/issues/2791 File ~/miniconda3/envs/tts2/lib/python3.8/site-packages/urllib3/connection.py:693, in HTTPSConnection.connect(self) 692 sock: socket.socket | ssl.SSLSocket --> 693 self.sock = sock = self._new_conn() 694 server_hostname: str = self.host File ~/miniconda3/envs/tts2/lib/python3.8/site-packages/urllib3/connection.py:214, in HTTPConnection._new_conn(self) 213 except OSError as e: --> 214 raise NewConnectionError( 215 self, f"Failed to establish a new connection: {e}" 216 ) from e 218 # Audit hooks are only available in Python 3.8+ NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f1350262370>: Failed to establish a new connection: [Errno 101] Network is unreachable The above exception was the direct cause of the following exception: <img width="1435" alt="image" src="/attachments/96f71ffb-8b39-4d4f-82ff-d3523d47fafa">
133 KiB

应该是没有找到模型,可以试下用模型的绝对路径

应该是没有找到模型,可以试下用模型的绝对路径
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: HswOAuth/llm_course#699
No description provided.