PaddleHub
PaddleHub copied to clipboard
下载ernie_tiny模型的时候,报错Can't connect to Hub Server: http://paddlepaddle.org.cn/paddlehub
欢迎您反馈PaddleHub使用问题,非常感谢您对PaddleHub的贡献! 在留下您的问题时,辛苦您同步提供如下信息:
- 版本、环境信息 1)PaddleHub和PaddlePaddle版本:请提供您的PaddleHub和PaddlePaddle版本号,例如PaddleHub1.4.1,PaddlePaddle1.6.2
PaddleHub2.0.0 PaddlePaddle2.0.0
2)系统环境:请您描述系统类型,例如Linux/Windows/MacOS/,python版本
- 复现信息:如为报错,请给出复现环境、复现步骤 liunx Python 3.6.4 错误描述: 执行如下Python命令: import paddlehub as hub model = hub.Module(name='ernie_tiny', task='seq-cls', num_classes=len(MyDataset.label_list))
报错信息:
[INFO 2021-02-24 11:40:02,485 filelock.py:274] Lock 140080785034600 acquired on /root/.paddlehub/tmp/ernie_tiny [INFO 2021-02-24 11:40:02,517 filelock.py:318] Lock 140080785034600 released on /root/.paddlehub/tmp/ernie_tiny
gaierror Traceback (most recent call last) /opt/conda/lib/python3.6/site-packages/urllib3/connection.py in _new_conn(self) 159 conn = connection.create_connection( --> 160 (self._dns_host, self.port), self.timeout, **extra_kw 161 ) /opt/conda/lib/python3.6/site-packages/urllib3/util/connection.py in create_connection(address, timeout, source_address, socket_options) 60 ---> 61 for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): 62 af, socktype, proto, canonname, sa = res /opt/conda/lib/python3.6/socket.py in getaddrinfo(host, port, family, type, proto, flags) 744 addrlist = [] --> 745 for res in _socket.getaddrinfo(host, port, family, type, proto, flags): 746 af, socktype, proto, canonname, sa = res gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred: NewConnectionError Traceback (most recent call last) /opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 676 headers=headers, --> 677 chunked=chunked, 678 ) /opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 391 else: --> 392 conn.request(ethod, url, **httplib_request_kw) 393 /opt/conda/lib/python3.6/http/client.py in request(self, method, url, body, headers, encode_chunked) 1238 """Send a complete request to the server.""" -> 1239 self._send_request(ethod, url, body, headers, encode_chunked) 1240 /opt/conda/lib/python3.6/http/client.py in _send_request(self, method, url, body, headers, encode_chunked) 1284 body = _encode(body, 'body') -> 1285 self.endheaders(body, encode_chunked=encode_chunked) 1286 /opt/conda/lib/python3.6/http/client.py in endheaders(self, message_body, encode_chunked) 1233 raise CannotSendHeader() -> 1234 self._send_output(essage_body, encode_chunked=encode_chunked) 1235 /opt/conda/lib/python3.6/http/client.py in _send_output(self, message_body, encode_chunked) 1025 del self._buffer[:] -> 1026 self.send(sg) 1027 /opt/conda/lib/python3.6/http/client.py in send(self, data) 963 if self.auto_open: --> 964 self.connect() 965 else: /opt/conda/lib/python3.6/site-packages/urllib3/connection.py in connect(self) 186 def connect(self): --> 187 conn = self._new_conn() 188 self._prepare_conn(conn) /opt/conda/lib/python3.6/site-packages/urllib3/connection.py in _new_conn(self) 171 raise NewConnectionError( --> 172 self, "Failed to establish a new connection: %s" % e 173 ) NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f6718e8e710>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred: MaxRetryError Traceback (most recent call last) /opt/conda/lib/python3.6/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 448 retries=self.ax_retries, --> 449 timeout=timeout 450 ) /opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 724 retries = retries.increment( --> 725 ethod, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] 726 ) /opt/conda/lib/python3.6/site-packages/urllib3/util/retry.py in increment(self, method, url, response, error, _pool, _stacktrace) 438 if new_retry.is_exhausted(): --> 439 raise MaxRetryError(_pool, url, error or ResponseError(cause)) 440 MaxRetryError: HTTPConnectionPool(host='paddlepaddle.org.cn', port=80): Max retries exceeded with url: /paddlehub/search?environments=python_version&environments=platform_version&environments=platform_system&environments=platform_architecture&environments=platform_type&word=ernie_tiny&type=module&hub_version=2.0.0&paddle_version=2.0.0 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6718e8e710>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
During handling of the above exception, another exception occurred: ConnectionError Traceback (most recent call last) /opt/conda/lib/python3.6/site-packages/paddlehub/server/server_source.py in request(self, path, params) 116 try: --> 117 result = requests.get(api, params, timeout=self._timeout) 118 return result.json() /opt/conda/lib/python3.6/site-packages/requests/api.py in get(url, params, **kwargs) 75 kwargs.setdefault('allow_redirects', True) ---> 76 return request('get', url, params=params, **kwargs) 77 /opt/conda/lib/python3.6/site-packages/requests/api.py in request(method, url, **kwargs) 60 with sessions.Session() as session: ---> 61 return session.request(ethod=ethod, url=url, **kwargs) 62 /opt/conda/lib/python3.6/site-packages/requests/sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json) 529 send_kwargs.update(settings) --> 530 resp = self.send(prep, **send_kwargs) 531 /opt/conda/lib/python3.6/site-packages/requests/sessions.py in send(self, request, **kwargs) 642 # Send the request --> 643 r = adapter.send(request, **kwargs) 644 /opt/conda/lib/python3.6/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 515 --> 516 raise ConnectionError(e, request=request) 517 ConnectionError: HTTPConnectionPool(host='paddlepaddle.org.cn', port=80): Max retries exceeded with url: /paddlehub/search?environments=python_version&environments=platform_version&environments=platform_system&environments=platform_architecture&environments=platform_type&word=ernie_tiny&type=module&hub_version=2.0.0&paddle_version=2.0.0 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6718e8e710>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
During handling of the above exception, another exception occurred:
ServerConnectionError Traceback (most recent call last)
ServerConnectionError Can't connect to Hub Server: http://paddlepaddle.org.cn/paddlehub
说明:计算机网络没有问题
我执行这个是unsuccessfully
可以ping到http://paddlepaddle.org.cn/paddlehub吗
同问,为啥互联网都能访问,却一直报网络连接失败的错,我在公司的服务器上挂代理也是这个样子,在家自己电脑连无线也是。
这问题有人解吗?
这问题有人解吗?
我现在都用他们开发的from pretrained函数加载模型了