#4783 [DEBUG] 新进程执行结束结束timeout=3[DEBUG] LLM重新断句完成,用时:71.62530303001404s[ERROR] 重新断句失败,已恢复原样 Logging error Traceback (most rece

2409:8a55* Posted at: 10 hours ago

[DEBUG] 新进程执行结束结束timeout=3
[DEBUG] LLM重新断句完成,用时:71.62530303001404s
[ERROR] 重新断句失败,已恢复原样


Logging error

Traceback (most recent call last):
File "logging\__init__.py", line 1103, in emit
AttributeError: 'NoneType' object has no attribute 'write'
Call stack:
File "videotrans\task\only_one.py", line 47, in run
File "videotrans\task\trans_create.py", line 394, in recogn
File "logging\__init__.py", line 1506, in error
File "logging\__init__.py", line 1624, in _log
File "logging\__init__.py", line 1634, in handle
File "logging\__init__.py", line 1696, in callHandlers
File "logging\__init__.py", line 968, in handle
File "logging\__init__.py", line 1108, in emit
Message: '重新断句失败,已恢复原样'
Arguments: ()

[DEBUG] 开始字幕翻译: 渠道4
[INFO] Starting call to 'videotrans.translator._openaicompat.OpenAICampat._item_task', this is the 1st time calling it.
[DEBUG] 字幕翻译:[deepseek,deepseek-v4-flash,https://api.deepseek.com/v1/]
[DEBUG] 以SRT格式翻译,原始字幕行数:477,翻译后行数:477
[DEBUG] 原始语言字幕和目标语言字幕行数一致,均为 source_len=477

[DEBUG] 跳过二次识别

1 Replies

LLM重新断句失败,已自动回退到原始字幕,不影响后续翻译流程。失败原因通常是AI模型返回格式异常、网络超时或模型配置不正确。

解决方案:

  1. 确认您在 菜单 → 工具 → 高级选项 → 通用设置 中选择的“LLM重新断句所用AI渠道”的API Key和模型名称正确,且账号余额充足。
  2. 尝试取消勾选“发送完整字幕”选项(主界面翻译渠道旁)。
  3. 降低“LLM重新断句每批字幕行数”(默认20,可改为10),减少单次请求量。
  4. 如果仍失败,可直接将“语音识别参数”中的“默认断句和LLM重新断句”设为“默认断句”,跳过LLM重断句,用标准断句即可。

日志末尾的 AttributeError: 'NoneType' object has no attribute 'write' 是软件内部日志句柄未初始化导致的次要问题,不影响实际功能,可忽略。

请查阅相关文档:

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Related resource