#707 RuntimeError: no choices:response=ChatCompletion(id='LXXYaKfiGv2N0-kP65iWsQk', choices=[Choice(finish_reason='content_fi

*243.49* Posted at: 3 hours ago 👁9

Error in subtitle translation:no choices:response=ChatCompletion(id='LXXYaKfiGv2N0-kP65iWsQk', choices=[Choice(finish_reason='content_filter: PROHIBITED_CONTENT', index=0, logprobs=None, message=None)], created=1759016237, model='gemini-2.5-pro', object='chat.completion', service_tier=None, system_fingerprint=None, usage=CompletionUsage(completion_tokens=0, prompt_tokens=862, total_tokens=862, completion_tokens_details=None, prompt_tokens_details=None))[Gemini AI]:

Traceback (most recent call last):

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

File "videotrans\translator\_base.py", line 97, 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 129, in run

File "videotrans\task\_translate_srt.py", line 48, in trans

File "videotrans\translator\__init__.py", line 865, in run

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

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

File "videotrans\translator\_gemini.py", line 74, in _item_task

RuntimeError: no choices:response=ChatCompletion(id='LXXYaKfiGv2N0-kP65iWsQk', choices=[Choice(finish_reason='content_filter: PROHIBITED_CONTENT', index=0, logprobs=None, message=None)], created=1759016237, model='gemini-2.5-pro', object='chat.completion', service_tier=None, system_fingerprint=None, usage=CompletionUsage(completion_tokens=0, prompt_tokens=862, total_tokens=862, completion_tokens_details=None, prompt_tokens_details=None))

=====

Windows-10-10.0.22631-SP0

version:v3.80

frozen:True

language:en

1 Replies

This article was replied by DeepSeek
The error occurs because the Gemini AI translation service has flagged your content as "PROHIBITED_CONTENT" and refused to process it. This is a content filtering issue on the side of the Gemini API, not a bug in pyVideoTrans.

Quick Solution:

1. Check your source text: The subtitle text you are trying to translate likely contains content that violates Gemini's usage policies (e.g., potentially sensitive, violent, or explicit material). Review and modify the source text if possible.

2. Switch translation service: The most reliable fix is to temporarily use a different translation service. In the pyVideoTrans interface, go to Translation Settings and change the "Translation Service" from "Gemini" to another option like "Google Translate," "Microsoft Translator," or "OpenAI ChatGPT."

Detailed Analysis:

The error log shows the key message: finish_reason='content_filter: PROHIBITED_CONTENT'. This means the Gemini API received your request but actively blocked it due to its internal safety filters. The pyVideoTrans software correctly sent the request and received this response from the API.

Since this is a policy enforcement by the third-party API (Gemini), the solution must involve either changing the input content or, more practically, switching to a different translation provider that may have different content policies. The software itself is functioning correctly.

You can find the configuration for translation services in the software's menu under Translation Settings.

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.

Donate: https://ko-fi.com/jianchang512

Trending Questions