#5549 程序内部错误:'NoneType' object has no attribute 'get'Traceback (most recent call last): File "videotrans\translator\_base.py"

120.199* Posted at: 21 hours ago

程序内部错误:'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\only_one.py", line 67, in run
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]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: G:/视频/wenjian/大师/姿势的精神/2周姿势/8/Figure Drawing_ The Spirit of the Pose Part 2 Gesture _ New Masters Academy.mp4,
输出结果保存到文件夹: G:/视频/wenjian/大师/姿势的精神/2周姿势/8/_video_out/Figure Drawing_ The Spirit of the Pose Part 2 Gesture _ New Masters Academy-mp4,
临时文件夹: D:/shipingongju/vido/tmp/13252/8a74a353bb
已选 清理已存在
已选 启用CUDA加速
未选 降噪
语音识别:Qwen-ASR(本地内置), model_name: 1.7B, 发音语言: 英语, 断句方式:默认断句
翻译渠道:兼容AI/本地模型,原始语言:英语,目标语言:简体中文, 已选 发送完整字幕
配音渠道:Edge-TTS(免费), 角色:Yunyang(Male/CN), 配音语言:简体中文, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
字幕: 嵌入硬字幕
代理地址:


=
system:Windows-10-10.0.26200-SP0
version:v4.03
frozen:True
language:zh
root_dir:D:/shipingongju/vido

1 Replies

NoneType 错误说明兼容AI/本地模型翻译渠道在调用API时返回了空响应(None),导致 .get() 调用失败。通常是API地址填写错误、密钥无效或本地服务未启动造成的。

解决步骤:

  1. 检查翻译渠道配置
    打开 菜单 → 翻译设置 → 本地大模型设置,确认:

    • API地址格式正确,例如 http://127.0.0.1:8000/v1/chat/completions(结尾不能有空格)
    • 模型名称填写正确(如 qwen2.5deepseek-v4 等)
    • 如果不需要密钥,留空;如果需要,填写正确的 API Key
  2. 确保本地服务已启动
    如果使用的是本地部署的大模型(如 Ollama、vLLM、LocalAI),请确认服务正在运行,并且 curl 测试能正常返回结果。
  3. 切换为其他翻译渠道验证
    临时改用 Microsoft 翻译DeepSeek 等渠道,如果能正常翻译,则说明是兼容渠道配置问题。
  4. 升级软件版本
    当前版本 v4.03 较旧,建议下载最新完整包 v4.03-0626 覆盖安装,该版本修复了多个兼容AI渠道的稳定性问题。

请查阅相关文档:

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: ko-fi.com/jianchang512

Related resource