#5960 翻译字幕阶段出错 [DeepSeek] 程序内部错误:'NoneType' object has no attribute 'get'Traceback (most recent call last):

240e:3b4* Posted at: 22 hours ago

翻译字幕阶段出错 [DeepSeek] 程序内部错误:'NoneType' object has no attribute 'get'
Traceback (most recent call last):

File "videotrans\translator\_base.py", line 68, in run

File "videotrans\translator\_base.py", line 142, in _run_srt

File "tenacity\__init__.py", line 338, in wrapped_f

File "tenacity\__init__.py", line 477, in call

File "tenacity\__init__.py", line 378, in iter

File "tenacity\__init__.py", line 421, in exc_check

tenacity.RetryError: RetryError[]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "videotrans\task\job.py", line 35, in run

File "videotrans\task\job.py", line 135, in process_task

File "videotrans\task\trans_create.py", line 608, in trans

File "videotrans\translator\__init__.py", line 860, in run

File "videotrans\translator\_base.py", line 71, in run

File "tenacity\__init__.py", line 480, in call

File "videotrans\translator\_openaicompat.py", line 79, in _item_task

AttributeError: 'NoneType' object has no attribute 'get'
cfg=[TaskCfgVTT]当前工作模式: 转录并翻译字幕
原始输入文件名: D:/Desktop/视频/嘉莹/716-719/7174.mp4,
输出结果保存到文件夹: D:/Desktop/视频/嘉莹/716-719/已翻译/7174-mp4,
临时文件夹: D:/soft/trans/win-pyvideotrans-v4.03-0626/tmp/14480/262a2a2c4d
已选 清理已存在
未选 启用CUDA加速
未选 降噪
语音识别:faster-whisper(本地内置), model_name: large-v3-turbo, 发音语言: 英语, 断句方式:默认断句
翻译渠道:DeepSeek,原始语言:英语,目标语言:意大利语, 已选 发送完整字幕
输出字幕格式: 单字幕
代理地址:


=
system:Windows-10-10.0.19045-SP0
version:v4.03
frozen:True
language:zh
root_dir:D:/soft/trans/win-pyvideotrans-v4.03-0626

1 Replies

该错误是由于 DeepSeek API 返回了空响应或格式异常,导致代码在解析时遇到 NoneType。可能原因及解决方法:

  1. 检查 API 密钥与余额:确认 DeepSeek 密钥有效、账户余额充足。
  2. 降低每批字幕行数:在 菜单 → 工具 → 高级选项 → 字幕翻译调整 中,将 AI翻译渠道每批字幕行数 设为 10-20,避免单次请求过大超限。
  3. 更换模型:在 DeepSeek 设置中尝试切换为 deepseek-v4-flashdeepseek-v4-pro
  4. 网络与代理:若在中国大陆使用 DeepSeek 不需要代理,请清空代理文本框;若使用其他需代理的渠道,请检查代理配置是否正常。
  5. 升级软件:你当前使用 v4.03,建议下载最新补丁升级至 v4.06,此版本修复了多项兼容问题。

请查阅相关文档:

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.

Dondate via ko-fi.com

Dondate via PayPal

Related resource