Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requests.exceptions.SSLError: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /repos/ultralytics/assets/releases/tags/v8.2.0 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)'))) #64

Closed
shuangdengmen opened this issue Jul 30, 2024 · 3 comments

Comments

@shuangdengmen
Copy link

(pipeline) D:\ProgramData\mineu\PDF-Extract-Kit-main>python pdf_extract.py --pdf data/pdfs/ocr_1.pdf
[2024-07-30 17:56:11,159] [ ERROR] check_version.py:39 - Error fetching version info
Traceback (most recent call last):
File "D:\MiniConda3\envs\pipeline\lib\site-packages\albumentations\check_version.py", line 32, in fetch_version_info
data = response.read()
File "D:\MiniConda3\envs\pipeline\lib\http\client.py", line 482, in read
s = self._safe_read(self.length)
File "D:\MiniConda3\envs\pipeline\lib\http\client.py", line 631, in _safe_read
data = self.fp.read(amt)
File "D:\MiniConda3\envs\pipeline\lib\socket.py", line 705, in readinto
return self._sock.recv_into(b)
File "D:\MiniConda3\envs\pipeline\lib\ssl.py", line 1307, in recv_into
return self.read(nbytes, buffer)
File "D:\MiniConda3\envs\pipeline\lib\ssl.py", line 1163, in read
return self._sslobj.read(len, buffer)
TimeoutError: The read operation timed out
Namespace(pdf='data/pdfs/ocr_1.pdf', output='output', vis=False, render=False)
2024-07-30 17:56:13
Started!
Traceback (most recent call last):
File "D:\MiniConda3\envs\pipeline\lib\site-packages\urllib3\connectionpool.py", line 466, in _make_request
self._validate_conn(conn)
File "D:\MiniConda3\envs\pipeline\lib\site-packages\urllib3\connectionpool.py", line 1095, in _validate_conn
conn.connect()
File "D:\MiniConda3\envs\pipeline\lib\site-packages\urllib3\connection.py", line 652, in connect
sock_and_verified = _ssl_wrap_socket_and_match_hostname(
File "D:\MiniConda3\envs\pipeline\lib\site-packages\urllib3\connection.py", line 805, in ssl_wrap_socket_and_match_hostname
ssl_sock = ssl_wrap_socket(
File "D:\MiniConda3\envs\pipeline\lib\site-packages\urllib3\util\ssl
.py", line 465, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
File "D:\MiniConda3\envs\pipeline\lib\site-packages\urllib3\util\ssl
.py", line 509, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "D:\MiniConda3\envs\pipeline\lib\ssl.py", line 513, in wrap_socket
return self.sslsocket_class._create(
File "D:\MiniConda3\envs\pipeline\lib\ssl.py", line 1104, in _create
self.do_handshake()
File "D:\MiniConda3\envs\pipeline\lib\ssl.py", line 1375, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\MiniConda3\envs\pipeline\lib\site-packages\urllib3\connectionpool.py", line 789, in urlopen
response = self._make_request(
File "D:\MiniConda3\envs\pipeline\lib\site-packages\urllib3\connectionpool.py", line 490, in _make_request
raise new_e
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\MiniConda3\envs\pipeline\lib\site-packages\requests\adapters.py", line 667, in send
resp = conn.urlopen(
File "D:\MiniConda3\envs\pipeline\lib\site-packages\urllib3\connectionpool.py", line 843, in urlopen
retries = retries.increment(
File "D:\MiniConda3\envs\pipeline\lib\site-packages\urllib3\util\retry.py", line 519, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /repos/ultralytics/assets/releases/tags/v8.2.0 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\ProgramData\mineu\PDF-Extract-Kit-main\pdf_extract.py", line 92, in
mfd_model = mfd_model_init(model_configs['model_args']['mfd_weight'])
File "D:\ProgramData\mineu\PDF-Extract-Kit-main\pdf_extract.py", line 30, in mfd_model_init
mfd_model = YOLO(weight)
File "D:\MiniConda3\envs\pipeline\lib\site-packages\ultralytics\models\yolo\model.py", line 23, in init
super().init(model=model, task=task, verbose=verbose)
File "D:\MiniConda3\envs\pipeline\lib\site-packages\ultralytics\engine\model.py", line 142, in init
self._load(model, task=task)
File "D:\MiniConda3\envs\pipeline\lib\site-packages\ultralytics\engine\model.py", line 294, in _load
self.model, self.ckpt = attempt_load_one_weight(weights)
File "D:\MiniConda3\envs\pipeline\lib\site-packages\ultralytics\nn\tasks.py", line 855, in attempt_load_one_weight
ckpt, weight = torch_safe_load(weight) # load ckpt
File "D:\MiniConda3\envs\pipeline\lib\site-packages\ultralytics\nn\tasks.py", line 768, in torch_safe_load
file = attempt_download_asset(weight) # search online if missing locally
File "D:\MiniConda3\envs\pipeline\lib\site-packages\ultralytics\utils\downloads.py", line 457, in attempt_download_asset
tag, assets = get_github_assets(repo, release)
File "D:\MiniConda3\envs\pipeline\lib\site-packages\ultralytics\utils\downloads.py", line 402, in get_github_assets
r = requests.get(url) # github api
File "D:\MiniConda3\envs\pipeline\lib\site-packages\requests\api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "D:\MiniConda3\envs\pipeline\lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "D:\MiniConda3\envs\pipeline\lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "D:\MiniConda3\envs\pipeline\lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "D:\MiniConda3\envs\pipeline\lib\site-packages\requests\adapters.py", line 698, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /repos/ultralytics/assets/releases/tags/v8.2.0 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)')))

(pipeline) D:\ProgramData\mineu\PDF-Extract-Kit-main>

@ouyanglinke
Copy link
Collaborator

Network issue, you need to use a proxy or a mirror source.

@charlessws
Copy link

@ouyanglinke 我遇到了同样的问题,请问必须设置科学上网吗?

@ouyanglinke
Copy link
Collaborator

是的,应该是第一次运行需要下载权重。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants