#3436 TaskCfgSTS(is_cuda=False, uuid='bda8818485', cache_folder=None, target_dir='E:/ytrans/output/translate', source_language

202.150* Posted at: 2 hours ago 👁5

Trans Error [Local/Compatible AI] 'NoneType' object is not subscriptable
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\task\job.py", line 174, in run
File "videotrans\task\_translate_srt.py", line 45, in trans
File "videotrans\translator\__init__.py", line 970, 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 71, in _item_task
TypeError: 'NoneType' object is not subscriptable
TaskCfgSTS(is_cuda=False, uuid='bda8818485', cache_folder=None, target_dir='E:/ytrans/output/translate', source_language=None, source_language_code='Simplified Chinese', source_sub='E:/PH/z/6.srt', source_wav=None, source_wav_output=None, target_language=None, target_language_code='English', target_sub='E:/ytrans/output/translate/6.English.srt', target_wav=None, target_wav_output=None, name='E:/PH/z/6.srt', noextname='6', basename='6.srt', ext='srt', dirname='E:/PH/z', shound_del_name=None, translate_type=8)


=
system:Windows-10-10.0.26100-SP0
version:v3.97
frozen:True
language:en
root_dir:E:/ytrans

1 Replies

This error is caused by the translation channel (Local/Compatible AI) returning an invalid None response, which the software cannot process.

To resolve this issue, follow these steps:

  1. Check the Translation Channel Configuration:

    • Go to the "Translation Channel" settings.
    • If you are using a local LLM (like Ollama), ensure the service is running and the API URL (e.g., http://127.0.0.1:11434/v1) is correct.
    • If you are using an online AI service (like DeepSeek, OpenAI), verify that the API Key is valid, the model name is entered correctly, and your account has sufficient credits or quota.
  2. Adjust Translation Settings:

    • In the "Advanced Options" for translation, try setting trans_thread (translation concurrency) to 1.
    • Temporarily disable the "Send complete subtitle" option and switch to line-by-line translation.
  3. Review the Source Subtitle File:

    • Check the source SRT file (E:/PH/z/6.srt) for any unusual formatting or empty lines that might cause the AI model to fail.
  4. Try a Different Translation Channel:

    • As a test, switch to a more reliable translation channel, such as "DeepSeek" or "Google Translate" (if available), to confirm the issue is specific to your current Local/Compatible AI setup.

Please refer to the relevant documentation:

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.

Related resource