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

长时间翻译完成后,会立马报错http429 #73

Closed
zoushenhh opened this issue Jun 23, 2023 · 1 comment
Closed

长时间翻译完成后,会立马报错http429 #73

zoushenhh opened this issue Jun 23, 2023 · 1 comment
Labels
question Further information is requested

Comments

@zoushenhh
Copy link

在我长达7小时不间断翻译后,看着进度立马走完的那一刻,任务立马报错,代码如下:
Traceback (most recent call last):
File "calibre_plugins.ebook_translator.engines.base", line 167, in get_result
File "mechanize_mechanize.py", line 257, in open
File "mechanize_mechanize.py", line 313, in _mech_open
mechanize._response.get_seek_wrapper_class..httperror_seek_wrapper: HTTP Error 429:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre_plugins.ebook_translator.translation", line 55, in _translate_text
File "calibre_plugins.ebook_translator.engines.deepl", line 122, in translate
File "calibre_plugins.ebook_translator.engines.base", line 179, in get_result
Exception: 无法解析返回的响应。原始数据:HTTP Error 429:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre_plugins.ebook_translator.engines.base", line 167, in get_result
File "mechanize_mechanize.py", line 257, in open
File "mechanize_mechanize.py", line 313, in _mech_open
mechanize._response.get_seek_wrapper_class..httperror_seek_wrapper: HTTP Error 429:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre_plugins.ebook_translator.translation", line 55, in _translate_text
File "calibre_plugins.ebook_translator.engines.deepl", line 122, in translate
File "calibre_plugins.ebook_translator.engines.base", line 179, in get_result
Exception: 无法解析返回的响应。原始数据:HTTP Error 429:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre_plugins.ebook_translator.engines.base", line 167, in get_result
File "mechanize_mechanize.py", line 257, in open
File "mechanize_mechanize.py", line 313, in _mech_open
mechanize._response.get_seek_wrapper_class..httperror_seek_wrapper: HTTP Error 429:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre_plugins.ebook_translator.translation", line 55, in _translate_text
File "calibre_plugins.ebook_translator.engines.deepl", line 122, in translate
File "calibre_plugins.ebook_translator.engines.base", line 179, in get_result
Exception: 无法解析返回的响应。原始数据:HTTP Error 429:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre_plugins.ebook_translator.engines.base", line 167, in get_result
File "mechanize_mechanize.py", line 257, in open
File "mechanize_mechanize.py", line 313, in _mech_open
mechanize._response.get_seek_wrapper_class..httperror_seek_wrapper: HTTP Error 429:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre_plugins.ebook_translator.translation", line 55, in _translate_text
File "calibre_plugins.ebook_translator.engines.deepl", line 122, in translate
File "calibre_plugins.ebook_translator.engines.base", line 179, in get_result
Exception: 无法解析返回的响应。原始数据:HTTP Error 429:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre_plugins.ebook_translator.engines.base", line 167, in get_result
File "mechanize_mechanize.py", line 257, in open
File "mechanize_mechanize.py", line 313, in _mech_open
mechanize._response.get_seek_wrapper_class..httperror_seek_wrapper: HTTP Error 429:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre_plugins.ebook_translator.translation", line 55, in _translate_text
File "calibre_plugins.ebook_translator.engines.deepl", line 122, in translate
File "calibre_plugins.ebook_translator.engines.base", line 179, in get_result
Exception: 无法解析返回的响应。原始数据:HTTP Error 429:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "runpy.py", line 196, in _run_module_as_main
File "runpy.py", line 86, in _run_code
File "site.py", line 83, in
File "site.py", line 78, in main
File "site.py", line 50, in run_entry_point
File "calibre\utils\ipc\worker.py", line 215, in main
File "calibre\utils\ipc\worker.py", line 150, in arbitrary_n
File "calibre_plugins.ebook_translator.convertion", line 93, in convert_book
File "calibre\ebooks\conversion\plumber.py", line 1281, in run
File "calibre_plugins.ebook_translator.convertion", line 86, in convert
File "calibre_plugins.ebook_translator.translation", line 149, in handle
File "calibre_plugins.ebook_translator.request", line 37, in run
File "asyncio\runners.py", line 44, in run
File "asyncio\base_events.py", line 641, in run_until_complete
File "calibre_plugins.ebook_translator.request", line 34, in create_tasks
File "calibre_plugins.ebook_translator.request", line 22, in create_worker
File "calibre_plugins.ebook_translator.translation", line 144, in process_translation
File "calibre_plugins.ebook_translator.translation", line 102, in _prepare_translation
File "calibre_plugins.ebook_translator.translation", line 88, in _translate_text
File "calibre_plugins.ebook_translator.translation", line 88, in _translate_text
File "calibre_plugins.ebook_translator.translation", line 88, in _translate_text
[Previous line repeated 1 more time]
File "calibre_plugins.ebook_translator.translation", line 78, in _translate_text
Exception: 无法从翻译引擎API获取数据。 无法解析返回的响应。原始数据:HTTP Error 429:


时间越长,报错几率越高.

@bookfere
Copy link
Owner

使用的哪个翻译引擎?如果是免费的,可以试试加大请求间隔或重试次数。

@bookfere bookfere closed this as not planned Won't fix, can't repro, duplicate, stale Jun 26, 2023
@bookfere bookfere added the question Further information is requested label Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants