栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

关于 paddleocr 的 SSLError错误

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

关于 paddleocr 的 SSLError错误

具体错误如下,原因可能有很多,但是我的原因是开了梯子,关掉梯子就好了,仅供参考

download https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar to C:Usersgaofengxu/.paddleocr/whlrecchch_PP-OCRv3_rec_inferch_PP-OCRv3_rec_infer.tar
Traceback (most recent call last):
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libsite-packagesurllib3connectionpool.py", line 700, in urlopen
    self._prepare_proxy(conn)
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libsite-packagesurllib3connectionpool.py", line 994, in _prepare_proxy
    conn.connect()
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libsite-packagesurllib3connection.py", line 364, in connect
    self.sock = conn = self._connect_tls_proxy(hostname, conn)
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libsite-packagesurllib3connection.py", line 499, in _connect_tls_proxy
    socket = ssl_wrap_socket(
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libsite-packagesurllib3utilssl_.py", line 453, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libsite-packagesurllib3utilssl_.py", line 495, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock)
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libssl.py", line 1040, in _create
    self.do_handshake()
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1125)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libsite-packagesrequestsadapters.py", line 440, in send
    resp = conn.urlopen(
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libsite-packagesurllib3connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libsite-packagesurllib3utilretry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='paddleocr.bj.bcebos.com', port=443): Max retries exceeded with url: /PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "a.py", line 5, in 
    ocr = PaddleOCR(use_angle_cls=True, lang="ch")  # need to run only once to download and load model into memory
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libsite-packagespaddleocrpaddleocr.py", line 421, in __init__
    maybe_download(params.rec_model_dir, rec_url)
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libsite-packagespaddleocrppocrutilsnetwork.py", line 55, in maybe_download
    download_with_progressbar(url, tmp_path)
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libsite-packagespaddleocrppocrutilsnetwork.py", line 26, in download_with_progressbar
    response = requests.get(url, stream=True)
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libsite-packagesrequestsapi.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libsite-packagesrequestsapi.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libsite-packagesrequestssessions.py", line 529, in request
    resp = self.send(prep, **send_kwargs)
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libsite-packagesrequestssessions.py", line 645, in send
    r = adapter.send(request, **kwargs)
  File "C:UsersgaofengxuAppDataLocalProgramsPythonPython38libsite-packagesrequestsadapters.py", line 517, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='paddleocr.bj.bcebos.com', port=443): Max retries exceeded with url: /PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)')))
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/942618.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号