PaddlePaddle / PaddleHub

Awesome pre-trained models toolkit based on PaddlePaddle. (400+ models including Image, Text, Audio, Video and Cross-Modal with Easy Inference & Serving)【安全加固,暂停交互,请耐心等待】
https://www.paddlepaddle.org.cn/hub
Apache License 2.0
12.69k stars 2.08k forks source link

Can't connect to Hub Server: http://paddlepaddle.org.cn/paddlehub #1905

Open iarno opened 2 years ago

iarno commented 2 years ago

虽然这么多issue还是open状态,但是还是想试试看有大佬帮忙看不?

Mac OS

python3.9.6) ➜  hellopython git:(master) ✗ python --version
Python 3.9.6
(python3.9.6) ➜  hellopython git:(master) ✗ pip -V
pip 22.1.2 from /Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/pip (python 3.9)
(python3.9.6) ➜  hellopython git:(master) ✗ pip show paddlepaddle
Name: paddlepaddle
Version: 2.3.0
Summary: Parallel Distributed Deep Learning
Home-page: UNKNOWN
Author:
Author-email: Paddle-better@baidu.com
License: Apache Software License
Location: /Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages
Requires: astor, decorator, numpy, opt-einsum, paddle-bfloat, Pillow, protobuf, requests, six
Required-by:
(python3.9.6) ➜  hellopython git:(master) ✗ pip show paddlehub
Name: paddlehub
Version: 2.2.0
Summary: A toolkit for managing pretrained models of PaddlePaddle and helping user getting started with transfer learning more efficiently.
Home-page: https://github.com/PaddlePaddle/PaddleHub
Author: PaddlePaddle Author
Author-email: UNKNOWN
License: Apache 2.0
Location: /Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages
Requires: colorama, colorlog, easydict, filelock, flask, gunicorn, matplotlib, numpy, opencv-python, packaging, paddle2onnx, paddlenlp, Pillow, pyyaml, pyzmq, rarfile, tqdm, visualdl
Required-by:
(python3.9.6) ➜  hellopython git:(master) ✗

报错

(python3.9.6) ➜  hellopython git:(master) ✗ python test.py
Traceback (most recent call last):
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1040, in _validate_conn
    conn.connect()
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/urllib3/connection.py", line 395, in connect
    self.ssl_context = create_urllib3_context(
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 350, in create_urllib3_context
    context.keylog_filename = sslkeylogfile
FileNotFoundError: [Errno 2] No such file or directory: '/Users/liuli/tls/sslkeylog.log'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/urllib3/connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/urllib3/util/retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/urllib3/packages/six.py", line 769, in reraise
    raise value.with_traceback(tb)
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1040, in _validate_conn
    conn.connect()
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/urllib3/connection.py", line 395, in connect
    self.ssl_context = create_urllib3_context(
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 350, in create_urllib3_context
    context.keylog_filename = sslkeylogfile
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/paddlehub/server/server_source.py", line 117, in request
    result = requests.get(api, params, timeout=self._timeout)
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/requests/sessions.py", line 723, in send
    history = [resp for resp in gen]
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/requests/sessions.py", line 723, in <listcomp>
    history = [resp for resp in gen]
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/requests/sessions.py", line 266, in resolve_redirects
    resp = self.send(
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/requests/adapters.py", line 547, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/liuli/Devspace/hellopython/test.py", line 3, in <module>
    lac = hub.Module(name="lac")
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/paddlehub/module/module.py", line 388, in __new__
    module = cls.init_with_name(
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/paddlehub/module/module.py", line 487, in init_with_name
    user_module_cls = manager.install(
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/paddlehub/module/manager.py", line 190, in install
    return self._install_from_name(name, version, ignore_env_mismatch)
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/paddlehub/module/manager.py", line 262, in _install_from_name
    result = module_server.search_module(name=name, version=version)
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/paddlehub/server/server.py", line 87, in search_module
    return self.search_resource(
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/paddlehub/server/server.py", line 113, in search_resource
    result = source.search_resource(name=name, type=type, version=version)
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/paddlehub/server/server_source.py", line 77, in search_resource
    result = self.request(path='search', params=params)
  File "/Volumes/T7/Applications/anaconda3/envs/python3.9.6/lib/python3.9/site-packages/paddlehub/server/server_source.py", line 120, in request
    raise ServerConnectionError(self._url)
paddlehub.server.server_source.ServerConnectionError: Can't connect to Hub Server: http://paddlepaddle.org.cn/paddlehub
UncleLLD commented 3 months ago

image 试试这个方法看看行不行