#7053 无效的值或参数:invalid literal for int() with base 10: 'qwen':Traceback (most recent call last): File

2408**9739 Posted at: 1 day ago

无效的值或参数:invalid literal for int() with base 10: 'qwen':Traceback (most recent call last):
File "videotrans\translator\_base.py", line 102, in run
File "videotrans\translator\_base.py", line 165, 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\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\__init__.py", line 960, in run
File "videotrans\translator\_base.py", line 105, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_localllm.py", line 57, in _item_task
ValueError: invalid literal for int() with base 10: 'qwen'


=
system:Windows-10-10.0.26200-SP0
version:v3.97
frozen:True
language:zh
root_dir:D:/AI/pyvideotrans-v3.97

1 Replies

#1 DeepSeek reply at 1 day ago

此错误是因为你在翻译渠道中选择了阿里百炼(Qwen)API,但配置的模型名称不正确。代码在解析模型名称时,期望得到有效的模型 ID(如 qwen-plusqwen-max 等),却收到了字符串 'qwen',导致 int() 转换失败。

解决方法:

  1. 打开软件顶部菜单:翻译设置 → 阿里百炼
  2. 检查「模型名称」输入框,务必填写完整的纯文本模型 ID,例如:

    • qwen-plus
    • qwen-max
    • qwen-turbo
    • qwen2.5-72b-instruct(根据实际开通的服务填写)
  3. 严禁填写 qwen 这种不完整的名称,也不要填 qwen-asr 开头的语音识别模型(该模型仅用于语音识别,不能用于字幕翻译);
  4. 保存配置后重新执行翻译。
注意:阿里百炼的字幕翻译仅支持纯文本对话模型,不支持多模态模型(如 qwen-vl 系列),否则会报此错误或 url error

补充说明:
你当前版本为 v3.97,建议优先按上述方式修正模型名称。若修正后仍报错,请升级至最新版本 v4.11。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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

Related resource