Byaidu / PDFMathTranslate

PDF scientific paper translation and bilingual comparison - 完整保留排版的 PDF 文档全文双语翻译,支持 Google/DeepL/Ollama/OpenAI 翻译
GNU Affero General Public License v3.0
782 stars 81 forks source link

deeplx报错 #46

Closed xxsunyxx closed 8 hours ago

xxsunyxx commented 12 hours ago

问题描述

请对问题进行描述,并提供日志或截图 本项目不处理网络环境引发的问题(例如 Empty translation result/Connection reset) D:>set DEEPL_SERVER_URL=https://deeplx.papercar.top/translate

(para) D:>pdf2zh geo.pdf -s deepl C:\anaconda\envs\para\lib\site-packages\doclayout_yolo\nn\tasks.py:733: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. ckpt = torch.load(file, map_location="cpu") 0%|▏ | 1/337 [00:01<11:01, 1.97s/it]ERROR:pdf2zh.converter:int() argument must be a string, a bytes-like object or a real number, not 'NoneType' ERROR:pdf2zh.converter:int() argument must be a string, a bytes-like object or a real number, not 'NoneType' ERROR:pdf2zh.converter:int() argument must be a string, a bytes-like object or a real number, not 'NoneType' ERROR:pdf2zh.converter:int() argument must be a string, a bytes-like object or a real number, not 'NoneType' ERROR:pdf2zh.converter:int() argument must be a string, a bytes-like object or a real number, not 'NoneType' ERROR:pdf2zh.converter:int() argument must be a string, a bytes-like object or a real number, not 'NoneType' ERROR:pdf2zh.converter:int() argument must be a string, a bytes-like object or a real number, not 'NoneType' ERROR:pdf2zh.converter:int() argument must be a string, a bytes-like object or a real number, not 'NoneType' ERROR:pdf2zh.converter:int() argument must be a string, a bytes-like object or a real number, not 'NoneType' ERROR:pdf2zh.converter:int() argument must be a string, a bytes-like object or a real number, not 'NoneType' ERROR:pdf2zh.converter:int() argument must be a string, a bytes-like object or a real number, not 'NoneType' ERROR:pdf2zh.converter:int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

测试文档

[!IMPORTANT] 请提供用于复现测试的 PDF 文档 Schaums outline of geometry (Barnett Rich, Christopher Thomas) (Z-Library).pdf

恭喜你爆star了,我的长江老板已经给你推了

Byaidu commented 12 hours ago

那个后面的 /translate 会自动加的,你只需要设置前面的部分就好了

set DEEPL_SERVER_URL=https://deeplx.papercar.top

Byaidu commented 11 hours ago

应该修好了,是上游 deepl 的问题

xxsunyxx commented 11 hours ago

有卡的机器在跑别的,一会试试反馈

xxsunyxx commented 11 hours ago

经过确认deeplx没法承载较高的负荷(远程调用和自有的deeplx都不太行)跑这本跑个开头就死了,2-3页的paper还可以. 如果开发分布式的请求,有点不道德. 如我一般翻书的..基本不太行

Byaidu commented 8 hours ago

确实,我这里也是,还以为是我网的问题……