具体错误如下,原因可能有很多,但是我的原因是开了梯子,关掉梯子就好了,仅供参考
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)')))



