关于 paddleocr 的 SSLError错误

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

download https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar to C:\Users\gaofengxu/.paddleocr/whl\rec\ch\ch_PP-OCRv3_rec_infer\ch_PP-OCRv3_rec_infer.tar
Traceback (most recent call last):
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 700, in urlopen
    self._prepare_proxy(conn)
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 994, in _prepare_proxy
    conn.connect()
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py", line 364, in connect
    self.sock = conn = self._connect_tls_proxy(hostname, conn)
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connection.py", line 499, in _connect_tls_proxy
    socket = ssl_wrap_socket(
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\ssl_.py", line 453, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\ssl_.py", line 495, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock)
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\ssl.py", line 1040, in _create
    self.do_handshake()
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\ssl.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:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 440, in send
    resp = conn.urlopen(
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 785, in urlopen
    retries = retries.increment(
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\retry.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 <module>
    ocr = PaddleOCR(use_angle_cls=True, lang="ch")  # need to run only once to download and load model into memory
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\site-packages\paddleocr\paddleocr.py", line 421, in __init__
    maybe_download(params.rec_model_dir, rec_url)
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\site-packages\paddleocr\ppocr\utils\network.py", line 55, in maybe_download
    download_with_progressbar(url, tmp_path)
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\site-packages\paddleocr\ppocr\utils\network.py", line 26, in download_with_progressbar
    response = requests.get(url, stream=True)
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 529, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 645, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\gaofengxu\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.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)')))
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值