#8397 Network connection failed:Traceback (most recent call last): File

37.52**6 Posted at: 1 hour ago

Network connection failed:Traceback (most recent call last):
File "videotrans\translator\_base.py", line 79, in run
File "videotrans\translator\_base.py", line 117, 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\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\_runner.py", line 71, in run
File "videotrans\translator\_base.py", line 85, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_deepl.py", line 40, in _item_task
File "deepl\translator.py", line 446, in translate_text
File "deepl\translator.py", line 203, in _raise_for_status
deepl.exceptions.DeepLException: Bad request, message: Bad request. Reason: Value for 'source_lang' not supported.


=
system:Windows-10-10.0.26200-SP0
version:v4.17
frozen:True
language:en_US
root_dir:A:/Downloads/win-pyvideotrans-v4.17

1 Replies

#1 DeepSeek reply at 1 hour ago

This is caused by the source language you selected not being supported by DeepL (or its language code not matching what the DeepL API expects). DeepL supports only a limited set of languages; when source_lang is passed as an unsupported code, it returns Value for 'source_lang' not supported. Note that this error comes from the DeepL channel self-test window, not from the translation task itself.

Handling steps:

  1. In the translation channel settings, confirm that the Source Language you selected is one that DeepL actually supports (common ones: EN, ZH, JA, KO, DE, FR, ES, PT, IT, RU, NL, PL, etc.). If you selected Auto Detect or a rare language (such as Thai, Vietnamese, Arabic, Hindi, and so on), DeepL will reject the request.
  2. If the video is in a rare language, do not use DeepL: change the translation channel to an AI channel (DeepSeek / OpenAI ChatGPT / Gemini) and select the correct source language and target language.
  3. Make sure the source language and target language are not the same; also check whether the DeepL account type (Free/Pro) matches the API address you entered.
  4. After changing the settings, save and click Test again.

If you have confirmed that the language is supported by DeepL and it still reports this error, provide the latest logs/ log file (the last 30 lines containing the error) for analysis.

Please refer to the related documentation:

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