#7665 翻译字幕阶段出错 [微软(免费)] 502 Server Error: Bad Gateway for url: https://edge.microsoft.com/translate/translatetext?from=&to=zh-

113.225**2 Posted at: 2 hours ago

翻译字幕阶段出错 [微软(免费)] 502 Server Error: Bad Gateway for url: https://edge.microsoft.com/translate/translatetext?from=&to=zh-Hans&isEnterpriseClient=false
Traceback (most recent call last):

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

File "videotrans\translator\_base.py", line 105, in _run_text

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 137, in process_task

File "videotrans\task\_stage_translate.py", line 31, in trans

File "videotrans\translator\_runner.py", line 67, in run

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

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

File "videotrans\translator\_microsoft.py", line 41, in _item_task

File "requests\models.py", line 1026, in raise_for_status

requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://edge.microsoft.com/translate/translatetext?from=&to=zh-Hans&isEnterpriseClient=false

self.cfg=[TaskCfgVTT]当前工作模式: 转录并翻译字幕
原始输入文件名: H:/有码/NTR/NTR-050.avi,
输出结果保存到文件夹: H:/有码/_video_out/NTR/NTR-050-avi,
临时文件夹: D:/软件/视频相关/win-pyvideotrans-v4.11/tmp/1284/5030a8b266
已选 清理已存在
已启用CUDA加速
未选 降噪
语音识别:openai-whisper(内置), large-v3-turbo, 发音语言: 日语, 断句方式:默认断句
翻译渠道:微软(免费),原始语言:日语,目标语言:简体中文, 已选 发送完整字幕
输出字幕格式: 单字幕


=
system:Windows-10-10.0.19041-SP0
version:v4.12
frozen:True
language:zh
root_dir:D:/软件/视频相关/win-pyvideotrans-v4.11

1 Replies

#1 DeepSeek reply at 2 hours ago

这是微软免费翻译接口(edge.microsoft.com)的服务端网关错误(502 Bad Gateway),通常由微软接口变动或临时不稳定引起,并非你的配置问题。

解决方案(任选其一):

  1. 改用 DeepSeek 翻译渠道(推荐,效果更好、价格极低):前往 https://platform.deepseek.com/ 注册充值(可充 1 元),获取 API Key,填入 菜单 → 翻译设置 → DeepSeek,然后在翻译渠道下拉中选择 Deepseek。

  2. 在翻译渠道中改用 Google(免费)(国内需科学上网),或改用本地模型 M2M100(内置)(首次使用会自动下载模型到 软件目录/models/m2m100_12b)。

  3. 若坚持使用微软翻译,可稍后重试,或点击 菜单 → 工具 → 高级选项 → 字幕翻译 → 翻译后暂停秒 调大请求间隔,降低触发频率。

补充说明:

  • 知识库中已明确记录:微软翻译使用的是免费在线 API,微软已多次更改该接口,导致 502/404 等错误频发。

    若当前版本较旧,可尝试升级到最新版 v4.14 后重试。

  • 注意你日志中显示 version:v4.12,但软件目录名为 win-pyvideotrans-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