jianchang512 / pyvideotrans

Translate the video from one language to another and add dubbing. 将视频从一种语言翻译为另一种语言,并支持api调用
https://pyvideotrans.com
GNU General Public License v3.0
10.07k stars 1.11k forks source link

gemini translation error #504

Closed johnfelipe closed 1 month ago

johnfelipe commented 1 month ago
2024-08-12 12:08:00,247 - VideoTrans - INFO - Wait to modify original language subtitles / continue
2024-08-12 12:08:00,247 - VideoTrans - INFO - 14 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-08-12 12:08:01,251 - VideoTrans - INFO - 13 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-08-12 12:08:02,257 - VideoTrans - INFO - 12 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-08-12 12:08:03,264 - VideoTrans - INFO - 11 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-08-12 12:08:04,278 - VideoTrans - INFO - 10 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-08-12 12:08:05,284 - VideoTrans - INFO - 9 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-08-12 12:08:06,293 - VideoTrans - INFO - 8 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-08-12 12:08:07,303 - VideoTrans - INFO - 7 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-08-12 12:08:08,308 - VideoTrans - INFO - 6 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-08-12 12:08:09,312 - VideoTrans - INFO - 5 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-08-12 12:08:10,320 - VideoTrans - INFO - 4 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-08-12 12:08:11,332 - VideoTrans - INFO - 3 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-08-12 12:08:12,341 - VideoTrans - INFO - 2 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-08-12 12:08:13,349 - VideoTrans - INFO - 1 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-08-12 12:08:14,362 - VideoTrans - INFO - 0 Automatically translated in seconds, you can click Pause and edit subtitles so that the translation is more accurate
2024-08-12 12:08:15,373 - VideoTrans - INFO - translate_start
2024-08-12 12:08:17,384 - VideoTrans - INFO - Start translating
2024-08-12 12:09:18,065 - VideoTrans - ERROR - [Gemini]请求失败:error='Timeout of 60.0s exceeded, last exception: 503 failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:10809: Connection refused'
2024-08-12 12:09:18,066 - VideoTrans - ERROR - 翻译出错:暂停0s
2024-08-12 12:09:18,066 - VideoTrans - INFO - 1 retries after error
2024-08-12 12:10:24,911 - VideoTrans - ERROR - [Gemini]请求失败:error='Timeout of 60.0s exceeded, last exception: 503 failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:10809: Connection refused'
2024-08-12 12:10:24,911 - VideoTrans - ERROR - 翻译出错:暂停0s
2024-08-12 12:10:24,911 - VideoTrans - INFO - 2 retries after error
2024-08-12 12:11:29,353 - VideoTrans - ERROR - [Gemini]请求失败:error='Timeout of 60.0s exceeded, last exception: 503 failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:10809: Connection refused'
2024-08-12 12:11:29,354 - VideoTrans - ERROR - 翻译出错:暂停0s
2024-08-12 12:11:29,354 - VideoTrans - ERROR - [Gemini]翻译请求失败:err='3 retries after error persists :Timeout of 60.0s exceeded, last exception: 503 failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:10809: Connection refused'
2024-08-12 12:11:29,379 - VideoTrans - ERROR - Gemini:3 retries after error persists :Timeout of 60.0s exceeded, last exception: 503 failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:10809: Connection refused
Traceback (most recent call last):
  File "videotrans\task\step.py", line 165, in trans
  File "videotrans\translator\__init__.py", line 450, in run
  File "videotrans\translator\gemini.py", line 239, in trans
Exception: Gemini:3 retries after error persists :Timeout of 60.0s exceeded, last exception: 503 failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:10809: Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "videotrans\task\trans_create.py", line 348, in trans
  File "videotrans\task\step.py", line 173, in trans
Exception: Gemini:3 retries after error persists :Timeout of 60.0s exceeded, last exception: 503 failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:10809: Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "videotrans\task\job.py", line 47, in run
  File "videotrans\task\trans_create.py", line 352, in trans
Exception: Gemini:3 retries after error persists :Timeout of 60.0s exceeded, last exception: 503 failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:10809: Connection refused
2024-08-12 12:11:29,380 - VideoTrans - ERROR - Error in subtitle translation:Gemini:3 retries after error persists :Timeout of 60.0s exceeded, last exception: 503 failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:10809: Connection refused
jianchang512 commented 1 month ago

del proxy address

johnfelipe commented 1 month ago

SNAG-0583

testing gemini without proxy

johnfelipe commented 1 month ago

SNAG-0584

2024-08-12 12:38:16,305 - VideoTrans - INFO - Start translating 60 
2024-08-12 12:38:16,476 - VideoTrans - ERROR - [Gemini]请求失败:error='429 Resource has been exhausted (e.g. check quota).'
2024-08-12 12:38:16,476 - VideoTrans - ERROR - 翻译出错:暂停0s
2024-08-12 12:38:16,747 - VideoTrans - ERROR - [Gemini]请求失败:error='429 Resource has been exhausted (e.g. check quota).'
2024-08-12 12:38:16,747 - VideoTrans - ERROR - 翻译出错:暂停0s
2024-08-12 12:38:16,748 - VideoTrans - INFO - 1 retries after error
2024-08-12 12:38:26,909 - VideoTrans - ERROR - [Gemini]请求失败:error='429 Resource has been exhausted (e.g. check quota).'
2024-08-12 12:38:26,909 - VideoTrans - ERROR - 翻译出错:暂停0s
2024-08-12 12:38:26,909 - VideoTrans - INFO - 2 retries after error
2024-08-12 12:38:37,080 - VideoTrans - ERROR - [Gemini]请求失败:error='429 Resource has been exhausted (e.g. check quota).'
2024-08-12 12:38:37,080 - VideoTrans - ERROR - 翻译出错:暂停0s
2024-08-12 12:38:37,080 - VideoTrans - ERROR - [Gemini]翻译请求失败:err='3 retries after error persists :429 Resource has been exhausted (e.g. check quota).'
2024-08-12 12:38:37,103 - VideoTrans - ERROR - Gemini:3 retries after error persists :429 Resource has been exhausted (e.g. check quota).
Traceback (most recent call last):
  File "videotrans\task\step.py", line 165, in trans
  File "videotrans\translator\__init__.py", line 450, in run
  File "videotrans\translator\gemini.py", line 239, in trans
Exception: Gemini:3 retries after error persists :429 Resource has been exhausted (e.g. check quota).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "videotrans\task\trans_create.py", line 348, in trans
  File "videotrans\task\step.py", line 173, in trans
Exception: Gemini:3 retries after error persists :429 Resource has been exhausted (e.g. check quota).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "videotrans\task\job.py", line 47, in run
  File "videotrans\task\trans_create.py", line 352, in trans
Exception: Gemini:3 retries after error persists :429 Resource has been exhausted (e.g. check quota).
2024-08-12 12:38:37,104 - VideoTrans - ERROR - Error in subtitle translation:Gemini:3 retries after error persists :429 Resource has been exhausted (e.g. check quota).
jianchang512 commented 1 month ago

image

Exceeding frequency limits requires adding additional pause time

johnfelipe commented 1 month ago

working correctly with set