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

process stops at 99% always, and there is a message。进度停在99%,程序崩溃 #110

Closed
WalleZJ opened this issue Aug 23, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@WalleZJ
Copy link

WalleZJ commented Aug 23, 2023

我在旧电脑 Win10使用Calibre 6.13,Translator版本 2.11版本,用来翻译epub书籍,一直没有太多问题。 但是最近买了一个新的电脑,把整个Calibre 库复制到新的电脑中,之后 就一直翻译出错。始终进度,停留在 99%。 而且窗口无法关闭,强制点击后 会崩溃Crash。重新启动后,点击输出,依然job停留在 99%的进度,然后查看log,有如下的报错。请帮忙解决下。(已经尝试过 软件和插件统一退回到旧的版本,依然报错。 新的6.25+2.12也一样的)
image
image

@WalleZJ
Copy link
Author

WalleZJ commented Aug 23, 2023

下面这张图 是点击关闭窗口按钮,崩溃前的截图。可以,看到 其实 所有段落,都已经翻译完了,但进度一直停留在 99%。
image

@WalleZJ WalleZJ changed the title process stops at 99% always, and there is a message process stops at 99% always, and there is a message。进度停在99%,程序崩溃 Aug 23, 2023
@bookfere
Copy link
Owner

你使用的网络是 IPv6 吗?我这里无法复现此错误,通过你提供的错误信息尝试修复了一下,试试看这个版本:

ebook-translator-202308232234.zip

@WalleZJ
Copy link
Author

WalleZJ commented Aug 23, 2023

重新导入你发的这个插件文件后,修复了, 非常感谢你的及时回复。一直很欣赏你们的付出,我的代码知识范畴主要在quant方面,希望有一天也能够加入你们,一起做贡献。 另外,大概知道是什么样的原因吗? 是不是以后我就要保留使用这个版本了?

@WalleZJ
Copy link
Author

WalleZJ commented Aug 23, 2023

另外 关于ipv6 , 我用cmd ipconfig/all 能看到有ipv6 也有 ipv4的地址,所以不清楚到底是不是ipv6. 这个笔记本是 surface pro9,别的一般,wifi好像是比较新的那种,大概是ipv6。如果需要什么信息,可以帮助到你们收集错误原因,可以说的具体一点,我尽量配合。 再次,感谢你们的付出。

@bookfere bookfere added the bug Something isn't working label Aug 24, 2023
@bookfere
Copy link
Owner

bookfere commented Aug 24, 2023

这个问题与 asyncio 的事件循环(event loops)实现有关。Windows 自 Python 3.8 之后(新版 Calibre 用的是 3.10)默认使用的实现是 ProactorEventLoop(使用 Windows 的 I/O Completion Ports 机制),但是貌似在实际运行过程中存在缺陷,因此针对 Windows 插件暂时将事件循环策略更换为 SelectorEventLoop 来避免问题。

我不是太确定这个错误是否由 IPv6 引起,只是在查资料的时候,看到类似的问题讨论中有人提了一嘴在 IPv4 没能重现错误。鉴于涉及到 asyncio 的底层实现,如果这个解决方法没太大问题,就暂时不花时间研究了。你不需要一直保持这个测试版本,因为下一个版本会包含这个错误修复,到时直接升级到最新版即可。

谢谢你的反馈,也欢迎随时贡献代码。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants