Byaidu / PDFMathTranslate

PDF scientific paper translation with preserved formats - 基于 AI 完整保留排版的 PDF 文档全文双语翻译,支持 Google/DeepL/Ollama/OpenAI 等服务,提供 CLI/GUI/Docker
https://pdf2zh.com
GNU Affero General Public License v3.0
3.07k stars 219 forks source link

使用图形交互界面跳转后翻译进程十数分钟不出结果,以下为命令符界面的反馈以及网站现状 #105

Closed qroads closed 3 days ago

qroads commented 3 days ago

屏幕截图 2024-11-22 165720 C:\Users\55236>pdf2zh -i Running on local URL: http://0.0.0.0:7860 Exception in thread Thread-3: Traceback (most recent call last): File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_transports\default.py", line 72, in map_httpcore_exceptions yield File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_transports\default.py", line 236, in handle_request resp = self._pool.handle_request(req) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_sync\connection_pool.py", line 256, in handle_request raise exc from None File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_sync\connection_pool.py", line 236, in handle_request response = connection.handle_request( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_sync\http_proxy.py", line 288, in handle_request connect_response = self._connection.handle_request( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_sync\connection.py", line 101, in handle_request raise exc File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_sync\connection.py", line 78, in handle_request stream = self._connect(request) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_sync\connection.py", line 156, in _connect stream = stream.start_tls(**kwargs) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_backends\sync.py", line 170, in start_tls raise exc File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\contextlib.py", line 137, in exit self.gen.throw(typ, value, traceback) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_exceptions.py", line 14, in map_exceptions raise to_exc(exc) from exc httpcore.ConnectTimeout: _ssl.c:1112: The handshake operation timed out

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

Traceback (most recent call last): File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\threading.py", line 973, in _bootstrap_inner self.run() File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\threading.py", line 910, in run self._target(*self._args, **self._kwargs) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\gradio\analytics.py", line 70, in _do_normal_analytics_request data["ip_address"] = get_local_ip_address() File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\gradio\analytics.py", line 131, in get_local_ip_address ip_address = httpx.get( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_api.py", line 210, in get return request( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_api.py", line 118, in request return client.request( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 837, in request return self.send(request, auth=auth, follow_redirects=follow_redirects) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 926, in send response = self._send_handling_auth( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 954, in _send_handling_auth response = self._send_handling_redirects( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 991, in _send_handling_redirects response = self._send_single_request(request) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 1027, in _send_single_request response = transport.handle_request(request) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_transports\default.py", line 236, in handle_request resp = self._pool.handle_request(req) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\contextlib.py", line 137, in exit self.gen.throw(typ, value, traceback) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_transports\default.py", line 89, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectTimeout: _ssl.c:1112: The handshake operation timed out Error launching GUI using 0.0.0.0. This may be caused by global mode of proxy software. Rerunning server... use close() to stop if you need to change launch() parameters.

Error launching GUI using 127.0.0.1. This may be caused by global mode of proxy software. Rerunning server... use close() to stop if you need to change launch() parameters.

Could not create share link. Missing file: C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\gradio\frpc_windows_amd64_v0.2.

Please check your internet connection. This can happen if your antivirus software blocks the download of this file. You can install manually by following these steps:

  1. Download this file: https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_windows_amd64.exe
  2. Rename the downloaded file to: frpc_windows_amd64_v0.2
  3. Move the file to this location: C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\gradio Exception in thread Thread-5: Traceback (most recent call last): File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_transports\default.py", line 72, in map_httpcore_exceptions yield File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_transports\default.py", line 236, in handle_request resp = self._pool.handle_request(req) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_sync\connection_pool.py", line 256, in handle_request raise exc from None File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_sync\connection_pool.py", line 236, in handle_request response = connection.handle_request( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_sync\http_proxy.py", line 288, in handle_request connect_response = self._connection.handle_request( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_sync\connection.py", line 101, in handle_request raise exc File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_sync\connection.py", line 78, in handle_request stream = self._connect(request) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_sync\connection.py", line 156, in _connect stream = stream.start_tls(**kwargs) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_backends\sync.py", line 170, in start_tls raise exc File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\contextlib.py", line 137, in exit self.gen.throw(typ, value, traceback) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_exceptions.py", line 14, in map_exceptions raise to_exc(exc) from exc httpcore.ConnectTimeout: _ssl.c:1112: The handshake operation timed out

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

Traceback (most recent call last): File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\threading.py", line 973, in _bootstrap_inner self.run() File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\threading.py", line 910, in run self._target(*self._args, self._kwargs) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\gradio\analytics.py", line 70, in _do_normal_analytics_request data["ip_address"] = get_local_ip_address() File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\gradio\analytics.py", line 131, in get_local_ip_address ip_address = httpx.get( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_api.py", line 210, in get return request( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_api.py", line 118, in request return client.request( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 837, in request return self.send(request, auth=auth, follow_redirects=follow_redirects) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 926, in send response = self._send_handling_auth( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 954, in _send_handling_auth response = self._send_handling_redirects( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 991, in _send_handling_redirects response = self._send_single_request(request) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 1027, in _send_single_request response = transport.handle_request(request) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_transports\default.py", line 236, in handle_request resp = self._pool.handle_request(req) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\contextlib.py", line 137, in exit self.gen.throw(typ, value, traceback) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_transports\default.py", line 89, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectTimeout: _ssl.c:1112: The handshake operation timed out Exception in thread Thread-6: Traceback (most recent call last): File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_transports\default.py", line 72, in map_httpcore_exceptions yield File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_transports\default.py", line 236, in handle_request resp = self._pool.handle_request(req) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_sync\connection_pool.py", line 256, in handle_request raise exc from None File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_sync\connection_pool.py", line 236, in handle_request response = connection.handle_request( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_sync\http_proxy.py", line 288, in handle_request connect_response = self._connection.handle_request( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_sync\connection.py", line 101, in handle_request raise exc File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_sync\connection.py", line 78, in handle_request stream = self._connect(request) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_sync\connection.py", line 156, in _connect stream = stream.start_tls(kwargs) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_backends\sync.py", line 170, in start_tls raise exc File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\contextlib.py", line 137, in exit self.gen.throw(typ, value, traceback) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpcore_exceptions.py", line 14, in map_exceptions raise to_exc(exc) from exc httpcore.ConnectTimeout: _ssl.c:1112: The handshake operation timed out

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

Traceback (most recent call last): File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\threading.py", line 973, in _bootstrap_inner self.run() File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\threading.py", line 910, in run self._target(*self._args, **self._kwargs) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\gradio\analytics.py", line 70, in _do_normal_analytics_request data["ip_address"] = get_local_ip_address() File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\gradio\analytics.py", line 131, in get_local_ip_address ip_address = httpx.get( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_api.py", line 210, in get return request( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_api.py", line 118, in request return client.request( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 837, in request return self.send(request, auth=auth, follow_redirects=follow_redirects) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 926, in send response = self._send_handling_auth( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 954, in _send_handling_auth response = self._send_handling_redirects( File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 991, in _send_handling_redirects response = self._send_single_request(request) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_client.py", line 1027, in _send_single_request response = transport.handle_request(request) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_transports\default.py", line 236, in handle_request resp = self._pool.handle_request(req) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\contextlib.py", line 137, in exit self.gen.throw(typ, value, traceback) File "C:\Users\55236\AppData\Local\Programs\Python\Python39\lib\site-packages\httpx_transports\default.py", line 89, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectTimeout: _ssl.c:1112: The handshake operation timed out

Byaidu commented 3 days ago

大概率是你系统环境有问题,建议开新环境或者docker

qroads commented 3 days ago

如何开新环境?尝试使用docker,但是显示Using default tag: latest

qroads commented 3 days ago

现在是Command output: raise ProxyError(e, request=request) Command output: 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\', ReadTimeoutError("HTTPSConnectionPool(host=\'huggingface.co\', port=443): Read timed out. (read timeout=10)")))'), '(Request ID: 2fa22157-0aed-42c4-b2fb-3b49aff96b77)') Command completed with return code: 1 Files after translation: ['input.pdf'] Translation failed: No output files found

Byaidu commented 3 days ago

Unable to connect to proxy 这不就是网络问题嘛,建议先给提问模版看完再来