PS E:\desktop\dasi\jiguang> pdf2zh “namixian.pdf”
urllib3.exceptions.ProxyError: ('Unable to connect to proxy', FileNotFoundError(2, 'No such file or directory'))
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\PYTHON\lib\site-packages\requests\adapters.py", line 667, in send
resp = conn.urlopen(
File "D:\PYTHON\lib\site-packages\urllib3\connectionpool.py", line 843, in urlopen
retries = retries.increment(
File "D:\PYTHON\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='huggingface.co', port=443): Max retries exceeded with url: /juliozhao/DocLayout-YOLO-DocStructBench/resolve/main/doclayout_yolo_docstructbench_imgsz1024.pt (Caused by ProxyError('Unable to connect to proxy', FileNotFoundError(2, 'No such file or directory')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\PYTHON\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "D:\PYTHON\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "D:\PYTHON\Scripts\pdf2zh.exe__main__.py", line 7, in
sys.exit(main())
File "D:\PYTHON\lib\site-packages\pdf2zh\pdf2zh.py", line 262, in main
extract_text(vars(parsed_args))
File "D:\PYTHON\lib\site-packages\pdf2zh\pdf2zh.py", line 87, in extract_text
pth = hf_hub_download(repo_id="juliozhao/DocLayout-YOLO-DocStructBench", filename="doclayout_yolo_docstructbench_imgsz1024.pt")
File "D:\PYTHON\lib\site-packages\huggingface_hub\utils_validators.py", line 114, in _inner_fn
return fn(*args, *kwargs)
File "D:\PYTHON\lib\site-packages\huggingface_hub\file_download.py", line 862, in hf_hub_download
return _hf_hub_download_to_cache_dir(
File "D:\PYTHON\lib\site-packages\huggingface_hub\file_download.py", line 925, in _hf_hub_download_to_cache_dir
(url_to_download, etag, commit_hash, expected_size, head_call_error) = _get_metadata_or_catch_error(
File "D:\PYTHON\lib\site-packages\huggingface_hub\file_download.py", line 1376, in _get_metadata_or_catch_error
metadata = get_hf_file_metadata(
File "D:\PYTHON\lib\site-packages\huggingface_hub\utils_validators.py", line 114, in _inner_fn
return fn(args, kwargs)
File "D:\PYTHON\lib\site-packages\huggingface_hub\file_download.py", line 1296, in get_hf_file_metadata
r = _request_wrapper(
File "D:\PYTHON\lib\site-packages\huggingface_hub\file_download.py", line 277, in _request_wrapper
response = _request_wrapper(
File "D:\PYTHON\lib\site-packages\huggingface_hub\file_download.py", line 300, in _request_wrapper
response = get_session().request(method=method, url=url, params)
File "D:\PYTHON\lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, send_kwargs)
File "D:\PYTHON\lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, *kwargs)
File "D:\PYTHON\lib\site-packages\huggingface_hub\utils_http.py", line 93, in send
return super().send(request, args, **kwargs)
File "D:\PYTHON\lib\site-packages\requests\adapters.py", line 694, in send
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /juliozhao/DocLayout-YOLO-DocStructBench/resolve/main/doclayout_yolo_docstructbench_imgsz1024.pt (Caused by ProxyError('Unable to connect to proxy', FileNotFoundError(2, 'No such file or directory')))"), '(Request ID: 6ab4c5d5-bf80-4d8e-9f95-9dbf47862eaf)')
问题描述
已接上vpn的情况下,在文件夹里打开终端,使用pdf2zh document.pdf命令失败,纯电脑小白,不了解编程有关内容,不清楚应该怎么搜索,只能前来反馈。
测试文档
PS E:\desktop\dasi\jiguang> pdf2zh “namixian.pdf” urllib3.exceptions.ProxyError: ('Unable to connect to proxy', FileNotFoundError(2, 'No such file or directory'))
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "D:\PYTHON\lib\site-packages\requests\adapters.py", line 667, in send resp = conn.urlopen( File "D:\PYTHON\lib\site-packages\urllib3\connectionpool.py", line 843, in urlopen retries = retries.increment( File "D:\PYTHON\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='huggingface.co', port=443): Max retries exceeded with url: /juliozhao/DocLayout-YOLO-DocStructBench/resolve/main/doclayout_yolo_docstructbench_imgsz1024.pt (Caused by ProxyError('Unable to connect to proxy', FileNotFoundError(2, 'No such file or directory')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "D:\PYTHON\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\PYTHON\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "D:\PYTHON\Scripts\pdf2zh.exe__main__.py", line 7, in
sys.exit(main())
File "D:\PYTHON\lib\site-packages\pdf2zh\pdf2zh.py", line 262, in main
extract_text(vars(parsed_args))
File "D:\PYTHON\lib\site-packages\pdf2zh\pdf2zh.py", line 87, in extract_text
pth = hf_hub_download(repo_id="juliozhao/DocLayout-YOLO-DocStructBench", filename="doclayout_yolo_docstructbench_imgsz1024.pt")
File "D:\PYTHON\lib\site-packages\huggingface_hub\utils_validators.py", line 114, in _inner_fn
return fn(*args, *kwargs)
File "D:\PYTHON\lib\site-packages\huggingface_hub\file_download.py", line 862, in hf_hub_download
return _hf_hub_download_to_cache_dir(
File "D:\PYTHON\lib\site-packages\huggingface_hub\file_download.py", line 925, in _hf_hub_download_to_cache_dir
(url_to_download, etag, commit_hash, expected_size, head_call_error) = _get_metadata_or_catch_error(
File "D:\PYTHON\lib\site-packages\huggingface_hub\file_download.py", line 1376, in _get_metadata_or_catch_error
metadata = get_hf_file_metadata(
File "D:\PYTHON\lib\site-packages\huggingface_hub\utils_validators.py", line 114, in _inner_fn
return fn(args, kwargs)
File "D:\PYTHON\lib\site-packages\huggingface_hub\file_download.py", line 1296, in get_hf_file_metadata
r = _request_wrapper(
File "D:\PYTHON\lib\site-packages\huggingface_hub\file_download.py", line 277, in _request_wrapper
response = _request_wrapper(
File "D:\PYTHON\lib\site-packages\huggingface_hub\file_download.py", line 300, in _request_wrapper
response = get_session().request(method=method, url=url, params)
File "D:\PYTHON\lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, send_kwargs)
File "D:\PYTHON\lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, *kwargs)
File "D:\PYTHON\lib\site-packages\huggingface_hub\utils_http.py", line 93, in send
return super().send(request, args, **kwargs)
File "D:\PYTHON\lib\site-packages\requests\adapters.py", line 694, in send
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /juliozhao/DocLayout-YOLO-DocStructBench/resolve/main/doclayout_yolo_docstructbench_imgsz1024.pt (Caused by ProxyError('Unable to connect to proxy', FileNotFoundError(2, 'No such file or directory')))"), '(Request ID: 6ab4c5d5-bf80-4d8e-9f95-9dbf47862eaf)')