Ebook Translator:用 Calibre 翻译多格式双语对照电子书
- 添加“开启/关闭”翻译元数据的选项;
- 更新土耳其语界面翻译;归功于 @DogancanYr
- 修复因缺少命名空间导致的输出错误;
- 修复无法重试翻译失败条目的错误;
- 修复无法正确显示自定义引擎配置的错误;
Ebook Translator 是书伴开发的一款 Calibre 插件,可以将不同格式不同语言的电子书翻译成指定语言(原文译文对照)指定格式的电子书,支持 Google、ChatGPT 和 DeepL 翻译引擎。
在日常的生活、工作或学习中,如果在阅读或翻译外文电子书的过程中需要频繁使用翻译软件,在内容和翻译软件之间来回切换,可能会成为一件颇为痛苦的事。Ebook Translator 插件借力 Calibre 对电子书的强大处理功能和翻译引擎对多种语言的翻译支持,可以轻松将译文添加到原文段落之后,如下图那样形成双语对照,方便辅助对原文的理解或作为译制材料时的参考。
▲ Ebook Translator 插件翻译的电子书效果
借助 Calibre 对多种电子书格式的灵活支持,进行翻译时,你可以自由地选择输入输出格式,比如把 TXT 翻译成为 TXT 或 EPUB,把 PDF 翻译成 PDF 或 DOCX。
Ebook Translator 插件源代码使用 GPL v3 许可证。插件项目托管在 GitHub 上。
一、功能简介
★ Ebook Translator 插件主要包含以下功能:
- 支持“批量模式”和“高级模式”两种翻译模式,应用于不同使用场景
- 支持所选翻译引擎所支持的语言(如 Google 翻译支持 134 种)
- 支持多种翻译引擎,包括 Google 翻译、ChatGPT 以及 DeepL
- 支持自定义翻译引擎(支持解析 JSON 和 XML 格式响应)
- 支持所有 Calibre 所支持的电子书格式(输入格式 48 种,输出格式 20 种)
- 支持批量翻译电子书,每本书的翻译过程同时进行互不影响
- 支持缓存翻译内容,在请求失败或网络中断后无需重新翻译
- 提供大量自定义设置,如将翻译的电子书存到 Calibre 书库或指定位置
★ Ebook Translator 插件支持翻译的语言:
- Google 翻译支持的语言列表
- DeepL 翻译支持的语言列表
- ChatGPT 具体支持语言不详
- 有道翻译支持的语言列表
- 百度翻译支持的语言列表
★ Ebook Translator 插件支持的输入格式:
EPUB, AZW3, AZW4, MOBI, PDF, DOCX, TXT, MARKDOWN, RTF, RECIPE, HTML, HTM, XHTML, XHTM, TXTZ, CB7, ODT, RAR, FBZ, CBC, SHTM, TEXT, SHTML, POBI, UPDB, OPF, TCR, PML, PDB, CHM, SNB, LRF, LIT, RB, DOWNLOADED_RECIPE, CBR, DJV, DJVU, MD, AZW, TEXTILE, DOCM, HTMLZ, PMLZ, CBZ, ZIP, PRC, FB2,SRT,PGN
★ Ebook Translator 插件支持的输出格式:
EPUB, AZW3, MOBI, KFX, PDF, DOCX, TXT, RTF, OEB, TCR, PDB, SNB, LRF, TXTZ, LIT, RB, HTMLZ, PMLZ, ZIP, FB2,SRT,PGN
二、安装插件
首先确保你的操作系统已经安装了 Calibre,然后通过一下任意方式安装本插件:
【方法一】通过 Calibre 安装
- 打开 Calibre 并依次点击其菜单【 首选项… → 插件 → 获取新的插件 】;
- 在插件列表中选中 Ebook Translator 然后点击 【 安装 】 按钮(请留意,首次安装此插件时,要选择把图标显示在主工具栏上);
- 最后关闭并重新打开 Calibre 即可正常使用。
【方法二】通过插件文件安装
- Ebook Translator 插件下载:插件主页 | GitHub下载 | 百度网盘 | Google Drive
NAME: Ebook-Translator-Calibre-Plugin_v2.2.0.zip
MD5: 4eda05385bf2f49d1b8a066b9795e3ab
SHA1: e9bcfc0d02c51dc7dd7d9de9a1f4b0c12e3f6ba0
- 首先在通过以上链接下载插件文件;
- 然后打开 Calibre 并依次点击其菜单【首选项 → 插件 → 从文件加载插件】;
- 在弹出的对话框中选择下载的扩展名为 .zip 的插件文件完成安装(请留意,首次安装此插件时,要选择把图标显示在主工具栏上);
- 最后关闭并重新打开 Calibre 即可正常使用。
如果想安装最新版本,可以访问 https://translator.bookfere.com 点击按钮【Rolling Release】下载。注意,最新版本在每次提交代码时自动生成,未经过严格测试,可能会存在错误。
如果安装插件后,插件图标未出现在 Calibre 的主工具栏上,可以依次点击 Calibre 的菜单【首选项 → 工具与菜单】,在弹出的对话框中点击下拉菜单并选择“主工具栏”,然后在左栏找到并选中插件图标,点击中间的右箭头按钮【>】将其添加到右栏,最后点击【应用】按钮即可。
三、使用方法
Ebook Translator 提供了两种翻译模式,在开启缓存状态下两者共享同一缓存数据。
1、高级模式
- 在 Calibre 书库中选中要推送的电子书,点击 Calibre 主工具栏上的【翻译书籍】图标按钮,或点击图标下拉菜单选择【高级模式】;
- 在弹出的提示框点击选择“高级模式”(首次打开);
- 选择“输入格式”和“输出格式”,点击【开始】进入“高级模式”翻译主界面;
- 点击【删除】按钮删除需要忽略翻译的选中段落(可选);
- 通过以下两种方式进行翻译:
- 点击【翻译所选】按钮翻译选中的段落
- 点击【翻译全部】按钮翻译全部电子书内容
- 翻译完成后,在右方“校对”区域,通过编辑下方文本并点击【保存】,可以更改翻译结果;
- 点击【输出】按钮,存储翻译完成后的电子书。输出任务将被推送添加到 Calibre 的任务队列。
2、批量模式
- 在 Calibre 书库中选中要推送的电子书,点击 Calibre 主工具栏上的【翻译书籍】图标按钮,或点击图标下拉菜单选择【批量模式】;
- 在弹出的提示框点击选择“批量模式”(首次打开);
- 进入插件主界面,在这里你可以修改“书名”(作为保存文件时使用的文件名),分别为每一本书选择“输入格式”、“输出格式”、“来源语言”(一般情况下“自动探测”即可满足需求)、“目标语言”(默认使用 Calibre 界面当前所用的语言);
- 点击下方的【翻译】按钮即可开始翻译。
插件会将每本电子书的翻译任务推送添加到 Calibre 的任务队列,你可以通过点击 Calibre 右下角的【任务】查看推送详情,双击任务条目可以进入日志实时查看正在翻译的内容。
三、插件设置
▲ Ebook Translator 通用设置
▲ Ebook Translator 引擎设置
▲ Ebook Translator 内容设置
有关设置内容的详细说明请查阅 Ebook Translator 项目的 Wiki 页面。
五、注意事项
开发 Ebook Translator 插件测试用的 Calibre 版本是 3.48 和最新版版本,因此理论上插件在 3.x 到 6.x 版本的 Calibre 中都能正常使用,但是如果版本低于 3.x,可能无法正常使用。
尽管 Ebook Translator 插件在发布会尽可能测试,但仍无法保证在任何情况下不会出现问题。
如果你在使用插件的过程中遇到了问题或有好的建议,欢迎报告错误或提交功能请求。
六、常见问题
1、翻译文件丢失
有些用户反馈翻译完成后无法打开文件,此问题通常发生在 Windows 系统上。在 Windows 系统中,有一个功能叫做 “存储感知”,它会自动清理长时间运行程序的临时文件。
为避免此问题,请通过插件的缓存管理器为缓存另外指定文件夹(请勿选择任何临时目录)。
2、翻译速度太慢
普通翻译服务(如 Google Translate)翻译 1000 个段落通常仅需不到 1 分钟的时间。如果你使用的是 ChatGPT 之类的生成式 AI,耗时则有较大的差异,建议根据服务的速率限制在设置中修改并发请求和请求间隔以加快翻译速度。另外,也可开启合并段落功能大幅提升翻译速度。
3、合并翻译效果
在使用 ChatGPT 时合并翻译功能表现较差,这是因为插件会在合并后的文本中添加标记,由于无法保证 ChatGPT 翻译这些文本后仍会保留这些标记,因此无法保证最终的翻译效果。因此,如果要使用的 ChatGPT 翻译电子书,不建议开启合并翻译功能。
七、更新日志:
2024.06.14 / v2.3.5
- 添加“开启/关闭”翻译元数据的选项;
- 更新土耳其语界面翻译;归功于 @DogancanYr
- 修复因缺少命名空间导致的输出错误;
- 修复无法重试翻译失败条目的错误;
- 修复无法正确显示自定义引擎配置的错误;
2024.05.05 / v2.3.4
- 为高级模式添加过滤功能;
- 支持通过 CSS 选择器保留元素;
- 支持设置需要优先提取的元;
- 添加翻译状态显示器;归功于 @Andy-AO
- 添加未对齐条目数量;归功于 @Andy-AO
- 将翻译失败的条目标记为红色;
- 缓存管理器显示缓存最后修改时间;
- 支持关闭以及自动隐藏通知;
- 添加快捷键和快速访问键;
- 允许用户选择译文书写方向;
- 分离显示翻译进度和转换进度;
- 修复无法设置原文颜色的错误;
- 修复为换行添加译文的错误;
- 修复删除条目出现错误的错误;
- 保存编辑后正确显示条目状态。
2024.03.27 / v2.3.3
- 新增 Claude 翻译引擎;
- 优化添加翻译功能;
- 界面语言添加土耳其语;归功于 @DogancanYr
- 显示电子书内容抽取细节;
- 支持为纯文本选择编码;
- 修复 Windows 下的输出错误;
- 修复 Windows 删除缓存错误。
© 「书伴」原创文章,转载请注明出处及原文链接:https://bookfere.com/post/1057.html
延伸阅读
- [2020.04.21] Kindle 阅读器固件升级至 5.12.5
- 亚马逊 Kindle 电子书发布指南(四)附录
- [网友投稿] 越狱插件 Kindle Text Editor 文本编辑器
- Readability:定时或立即把长文推送到 Kindle
- 如何通过 WiFi 把手机中的电子书传送到 Kindle
- [每周一书] 辉煌经济背后《陌生的中国人》
- [网友投稿]《效率脑科学》读书笔记:情绪的产生机制
- [2021.03.17] Kindle Paperwhite 3 固件升级至 5.13.5
- 三二一!Sherry 精选英文分阶阅读系列(一)
- 王小妮:读书往事和始终的疑问
- [网友投稿] 已越狱的日亚版 Kindle 如何移除屏保广告特惠
- [2022.04.26] Kindle 阅读器固件升级至 5.14.3
- [每周一书] 借《教养的迷思》反思传统育儿观念
- 亚马逊 Kindle Oasis(2017)开箱评测视频总汇
- 2024 款 Kindle 11 和 Kindle Paperwhite 6 上架京东自营
不好意思,问一个不相关的。实在是遇到一个kindle使用上令我十分困惑的问题,全网都没找到有效的解决方案。我在Z-Library下载了一本中文电子书(mobi格式),直接用usb数据线传到kindle paperwhite 5(KP5) 的document目录下,这时候能显示但是发现不能调用我自导的字体,用kindle unpack 看了下是资源发现其是mobi 7。遂用calibre转换成mobi (both)格式未作任何其他更改,再次传到KP5上,始终无法在kindle上看到这本书。我又试着转换成azw3,依旧在kindle设备上不显示,我重启了设备甚至恢复了出场设置,依旧无功而返。
请问你们有收到类似的反馈或情况吗?
非常期盼也感谢任何回复及帮助。
层主习惯通过 Calibre 的“保存到磁盘”功能将转换后的电子书保存到 Kindle 中,而电子书名的长度超过了 Kindle 系统的文件名长度限制(255 个字节),解决方法为通过 Calibre 列表的书名列修改书名(或通过元数据修改功能修改书名),缩短其长度后再通过保存磁盘功能将电子书保存到 Kindle 中阅读。
另,如果想要提出的问题没有相关的页面可供留言,可前往书伴的“许愿”页面提问。
是的,问题已经解决了,谢谢书伴耐心又认真回复!!!
能開發一個功能嗎?
因為拿來翻輕小說,人名這種可以指定讓GPT固定名稱這樣。
讓我可以設定一個人名、或地名之類的特定名稱的資料庫,只要GPT碰到這個人名、地名或物品,就固定翻成一樣的名字這樣。
谢谢建议。之后的版本会尝试添加此功能。
謝謝回覆,也非常感謝你們有開發這樣好的工具,真的很實用。
順便分享一下我現在使用的方式。
目前GPT有一個很大的問題,人名之類的翻譯不會固定住,例如︰傑特、杰特、結特,你會在整篇文章都會看到人名或者是一些特定名詞出現這種情況,那就反其道而行,我先把特定名詞在翻譯前先固定住。
也就是,calibre在EPUB的編輯模式下,上面有搜尋→已儲存的搜尋,左下角會出現可以建立搜尋與取代的資料庫,按加入搜尋,名稱隨便打,你可以打主角,搜尋打日文的ジーター,取代打傑特,然後按下面的完成,然後按全部取代,它就會把所有的ジーター改成傑特,你資料庫建立的越完整(人名啊、地名啊、什麼怪東西啊),這些特定名詞就會固定住,就算你一次100篇合成一本,它也會全部弄好,為了之後慢慢加東西,下面有匯出,把專屬這個小說的資料庫儲存起來。
這樣多多少少會提升一點文章的可讀性,目前我是這樣土砲解決問題的。
我可以确定不是路径的问题,有一本翻译成功了,确实你所说的,有一个original的文件,但有些文件显示翻译成功了,却保存在一个临时路径中,可以打开,但无论如何这个文件却找不到,也没按照当初的指定路径进行存放。
电子书翻译完成后进行转换时会先存放到临时目录,再根据设置的输出路径拷贝到相应位置(如果选的是书库,就会添加到原电子书所在位置,如果是指定其他路径,就会存放到那个路径),拷贝完成后临时路径中的文件会被清理,因此在日志中显示的路径中是无法找到文件的。
旧版本插件会删除转换后的临时文件,新的版本去掉了这个步骤,把清理临时文件的工作交给了 Calibre,按理说应该不会再出现这个问题了,你可以再测试一下。
软件为6.14版本,插件版本为最新1.02。输入epub,输出mobi和awz3都分别试过,翻译完成之后,只弹出是否阅读通知,保存目录和缓存目录均找不到MOBI和awz3格式的文件。
新版本什么时候发布?
新版本已发布,你可以尝试一下看是否解决了之前所遇到的问题。
一般需要多久呢,看起来进度非常长,唯一快速好的发现只翻译了标题
翻译速度和网络响应速度和设置的请求时间间隔有关。以免费的 Google 翻译为例,在正常的网络环境下,按默认设置的每个请求间隔 0~5 秒钟来算,翻译 600 段按理说不超过 50 分钟。免费的 Google 翻译 API 对请求频率有限制,有时不得不加长请求间隔,导致耗时进一步增加。
只翻译标题的问题,在新版本中已得到解决,近两天会将会发布,敬请关注。
我用的是Calibre的最新版本,翻译插件用的是1.0.2.输入格式用EPUB翻译后用EPUB、MOBI都试过,翻译完甚至可以打开,但就是找不到文件,看日志有个缓存地址,但里面的文件没有。
如果你没有在设置中指定路径,那么默认会存放到 Calibre 书库中,目前的版本是翻译完成放在原格式所在位置。这种方式存在问题,那就是当你用 EPUB 翻译成 EPUB 格式,原格式则会被备份成 ORIGINAL_EPUB。有好几个用户反馈了这个问题,近两天会将要发布的新版对此做了修正,会将翻译好书作为新的一本书添加到 Calibre 书库中。
我也是遇到同样的问题。
反应几个问题
1.翻译完成后,原本设置保存文件的位置并没有找到已翻译的文件,会丢失。比如保存位置为桌面,实际桌面只有一个0字节的同名文件。
2.希望翻译完成之后,能够翻译内容单独输出,删除原文件内容,而不是用英文中文夹杂在一起。
以上两点。谢谢。
关于第一个问题,你用的是哪个版本,输入格式和输出格式分别是什么?关于第二个问题,新版本会增加偏好设置,可设置成仅保留译文。
我也碰到同样问题,翻译完成后,所设置保存的文件夹里空空如也,怎么也找不到翻译好书。
請問情況這個是google 翻譯請求過多的原因嗎?
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 47, in
File “site.py”, line 43, in main
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 70, in convert_book
plumber.run()
File “calibre/ebooks/conversion/plumber.py”, line 1281, in run
File “calibre_plugins.ebook_translator.convertion”, line 65, in convert
translation.handle(elements)
File “calibre_plugins.ebook_translator.translation”, line 126, in handle
self._handle(element)
File “calibre_plugins.ebook_translator.translation”, line 90, in _handle
translation = self._translate(original)
File “calibre_plugins.ebook_translator.translation”, line 62, in _translate
return self._translate(text, count, interval)
File “calibre_plugins.ebook_translator.translation”, line 62, in _translate
return self._translate(text, count, interval)
File “calibre_plugins.ebook_translator.translation”, line 62, in _translate
return self._translate(text, count, interval)
File “calibre_plugins.ebook_translator.translation”, line 54, in _translate
raise Exception(‘{} {}’.format(message, str(e)))
Exception: 无法从翻译引擎API获取数据。 HTTP Error 400: Bad Request
看起来是的,建议加长请求间隔。
试用了下效果还不错,希望后续版本中插件可以通过命令行模式下的calibre-debug来调用。
尝试了几次,从google翻译更换到ChatGPT翻译,还是一直报错。
[自动探测 > Chinese (Simplified)] 翻译 “2303.17564v1”
qt.webenginecontext:
GL Type: disabled
Surface Type: DefaultRenderableType
Surface Profile: CoreProfile
Surface Version: 4.1
QSG RHI Backend: OpenGL
Using Supported QSG Backend: yes
Using Software Dynamic GL: no
Using Multithreaded OpenGL: yes
Init Parameters:
* application-name calibre
* browser-subprocess-path /Applications/calibre.app/Contents/Frameworks/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess
* disable-features ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture
* disable-gpu
* disable-speech-api
* enable-features NetworkServiceInProcess,TracingServiceInProcess
* enable-threaded-compositing
* in-process-gpu
* use-gl disabled
InputFormatPlugin: PDF Input running
on /Users/yuandan/Calibre Library/Wei Zhi/2303.17564v1 (3)/2303.17564v1 – Wei Zhi.pdf
pdftohtml log:
link to page 1
…
link to page 42 Page-65
Parsing all content…
Merging user specified metadata…
Detecting structure…
Flattening CSS and remapping font sizes…
Source base font size is 12.00000pt
Removing fake margins…
Cleaning up manifest…
Trimming unused files from manifest…
Creating PDF Output…
translating ebook content … (this will take a while)
==============================
开始翻译电子书内容:
==============================
全部条目:2786
——————————
原文:BloombergGPT: A Large Language Model for Finance
无法从翻译引擎API获取数据。
5 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
10 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
15 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
20 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
25 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
30 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
35 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
40 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
45 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
50 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
55 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
60 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
65 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
70 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
75 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
80 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
85 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
90 秒后重试。
正在重试 …(300.0秒后超时)
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “mechanize/_urllib2_fork.py”, line 1236, in do_open
File “http/client.py”, line 1282, in request
File “http/client.py”, line 1328, in _send_request
File “http/client.py”, line 1277, in endheaders
File “http/client.py”, line 1037, in _send_output
File “http/client.py”, line 975, in send
File “http/client.py”, line 1447, in connect
File “http/client.py”, line 951, in connect
File “http/client.py”, line 920, in _tunnel
File “http/client.py”, line 287, in _read_status
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
return escape(trim(self.translator.translate(text)))
File “calibre_plugins.ebook_translator.engines.chatgpt”, line 33, in translate
response = self.request(data, method=’POST’, headers=headers)
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
response = self.br.open(request)
File “mechanize/_mechanize.py”, line 257, in open
File “mechanize/_mechanize.py”, line 287, in _mech_open
File “mechanize/_opener.py”, line 193, in open
File “mechanize/_urllib2_fork.py”, line 425, in _open
File “mechanize/_urllib2_fork.py”, line 414, in _call_chain
File “mechanize/_urllib2_fork.py”, line 1283, in https_open
File “mechanize/_urllib2_fork.py”, line 1240, in do_open
urllib.error.URLError:
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 41, in
File “site.py”, line 37, in main
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 71, in convert_book
plumber.run()
File “calibre/ebooks/conversion/plumber.py”, line 1281, in run
File “calibre_plugins.ebook_translator.convertion”, line 66, in convert
translation.handle(elements)
File “calibre_plugins.ebook_translator.translation”, line 125, in handle
self._handle(element)
File “calibre_plugins.ebook_translator.translation”, line 90, in _handle
translation = self._translate(original)
File “calibre_plugins.ebook_translator.translation”, line 62, in _translate
return self._translate(text, count)
File “calibre_plugins.ebook_translator.translation”, line 62, in _translate
return self._translate(text, count)
File “calibre_plugins.ebook_translator.translation”, line 62, in _translate
return self._translate(text, count)
[Previous line repeated 15 more times]
File “calibre_plugins.ebook_translator.translation”, line 54, in _translate
raise Exception(‘{} {}’.format(message, str(e)))
Exception: 无法从翻译引擎API获取数据。
错误信息都是:Remote end closed connection without response(远端关闭连接无响应),可能网络代理有问题,更换代理试试看。
真棒,每次打开书伴都有新的惊喜,何曾想下载了N多的英语读本,配合着wordwise,仍然没有办法很好地看书,现在好了,看到这个,直接满足的需求,好吧,支持书伴!!!
我成功了。Google Translate。两次失败后之后,将重试次数增加到10次。一本172页5400行(段)的书此番用时7小时25分钟完成。感谢!
牛逼。
calibre, version 6.14.0 (win32, embedded-python: True)
翻译失败: 失败: [自动探测 > Chinese (Simplified)] 翻译 “ナショナリズムとジェンダー (上野千鶴子) (Z-Library)”
[自动探测 > Chinese (Simplified)] 翻译 “ナショナリズムとジェンダー (上野千鶴子) (Z-Library)”
InputFormatPlugin: PDF Input running
on D:\书库\Wei Zhi\nasiyonarizumutozienda (Shang Ye Qia (2)\nasiyonarizumutozienda (Shang Y – Wei Zhi.pdf
pdftohtml log:
Page-1
…
Page-242
Parsing all content…
Generating default TOC from spine…
Merging user specified metadata…
Detecting structure…
Auto generated TOC with 0 entries.
Flattening CSS and remapping font sizes…
Source base font size is 12.00000pt
Removing fake margins…
Cleaning up manifest…
Trimming unused files from manifest…
Creating PDF Output…
translating ebook content … (this will take a while)
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 71, in convert_book
File “calibre\ebooks\conversion\plumber.py”, line 1281, in run
File “calibre_plugins.ebook_translator.convertion”, line 66, in convert
File “calibre_plugins.ebook_translator.translation”, line 116, in handle
Exception: 没有需要翻译的内容。
Calibre 无法将扫描版 PDF 转换成文本,因此插件也无法翻译这类 PDF。
昨晚试了两本书都行,但是现在突然用不了了。要么提示“无法从翻译引擎API获取数据。”,要么翻译到一半提示无法检测文档语言。我用的是免费的google翻译。
这种情况很可能是 Google 翻译拒绝服务导致的,可以重试两次,还不行的话就需要更换 IP 重试了。当然也有其它可能,可以把日志末尾提示的具体错误信息贴上来看看。无法检测语言的问题,可以给“来源语言”手动指定一下语言,看能不能解决。
这是最后的日志:
无法从翻译引擎API获取数据。
5 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
10 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
15 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
20 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
25 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
30 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
35 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
40 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
45 秒后重试。
正在重试 …(300.0秒后超时)
无法从翻译引擎API获取数据。
50 秒后重试。
正在重试 …(300.0秒后超时)
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
File “calibre_plugins.ebook_translator.engines.google”, line 19, in translate
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
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: Too Many Requests
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
File “calibre_plugins.ebook_translator.engines.google”, line 19, in translate
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
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: Too Many Requests
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
File “calibre_plugins.ebook_translator.engines.google”, line 19, in translate
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
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: Too Many Requests
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
File “calibre_plugins.ebook_translator.engines.google”, line 19, in translate
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
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: Too Many Requests
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
File “calibre_plugins.ebook_translator.engines.google”, line 19, in translate
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
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: Too Many Requests
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
File “calibre_plugins.ebook_translator.engines.google”, line 19, in translate
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
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: Too Many Requests
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
File “calibre_plugins.ebook_translator.engines.google”, line 19, in translate
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
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: Too Many Requests
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
File “calibre_plugins.ebook_translator.engines.google”, line 19, in translate
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
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: Too Many Requests
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
File “calibre_plugins.ebook_translator.engines.google”, line 19, in translate
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
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: Too Many Requests
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
File “calibre_plugins.ebook_translator.engines.google”, line 19, in translate
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
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: Too Many Requests
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “calibre_plugins.ebook_translator.translation”, line 50, in _translate
File “calibre_plugins.ebook_translator.engines.google”, line 19, in translate
File “calibre_plugins.ebook_translator.engines.base”, line 31, in request
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: Too Many Requests
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 71, in convert_book
File “calibre\ebooks\conversion\plumber.py”, line 1281, in run
File “calibre_plugins.ebook_translator.convertion”, line 66, in convert
File “calibre_plugins.ebook_translator.translation”, line 125, in handle
File “calibre_plugins.ebook_translator.translation”, line 90, in _handle
File “calibre_plugins.ebook_translator.translation”, line 62, in _translate
File “calibre_plugins.ebook_translator.translation”, line 62, in _translate
File “calibre_plugins.ebook_translator.translation”, line 62, in _translate
[Previous line repeated 7 more times]
File “calibre_plugins.ebook_translator.translation”, line 54, in _translate
Exception: 无法从翻译引擎API获取数据。 HTTP Error 429: Too Many Requests
这应该是 Google 翻译拒绝服务了,建议更换 IP 并在插件设置中加长请求间隔。
代理设置是个问题啊!