Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

完成Translating chunks后报错,多次重试依然报错 #241

Open
Github37525 opened this issue Nov 8, 2024 · 2 comments
Open

完成Translating chunks后报错,多次重试依然报错 #241

Github37525 opened this issue Nov 8, 2024 · 2 comments

Comments

@Github37525
Copy link

2024-11-08 10:59:31.609 Uncaught app exception
Traceback (most recent call last):
File "C:\Users\jackyqin\anaconda3\envs\videolingo\lib\site-packages\streamlit\runtime\scriptrunner\exec_code.py", line 88, in exec_func_with_error_handling
result = func()
File "C:\Users\jackyqin\anaconda3\envs\videolingo\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 590, in code_to_exec
exec(code, module.dict)
File "C:\Users\jackyqin\Desktop\VideoLingo\st.py", line 117, in
main()
File "C:\Users\jackyqin\Desktop\VideoLingo\st.py", line 113, in main
text_processing_section()
File "C:\Users\jackyqin\Desktop\VideoLingo\st.py", line 30, in text_processing_section
process_text()
File "C:\Users\jackyqin\Desktop\VideoLingo\st.py", line 53, in process_text
step4_2_translate_all.translate_all()
File "C:\Users\jackyqin\Desktop\VideoLingo\core\step4_2_translate_all.py", line 82, in translate_all
results.append(future.result())
File "C:\Users\jackyqin\anaconda3\envs\videolingo\lib\concurrent\futures_base.py", line 438, in result
return self.__get_result()
File "C:\Users\jackyqin\anaconda3\envs\videolingo\lib\concurrent\futures_base.py", line 390, in __get_result
raise self._exception
File "C:\Users\jackyqin\anaconda3\envs\videolingo\lib\concurrent\futures\thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "C:\Users\jackyqin\Desktop\VideoLingo\core\step4_2_translate_all.py", line 48, in translate_chunk
translation, english_result = translate_lines(chunk, previous_content_prompt, after_content_prompt, things_to_note_prompt, theme_prompt, i)
File "C:\Users\jackyqin\Desktop\VideoLingo\core\translate_once.py", line 54, in translate_lines
express_result = retry_translation(prompt2, 'expressiveness')
File "C:\Users\jackyqin\Desktop\VideoLingo\core\translate_once.py", line 43, in retry_translation
raise ValueError(f'[red]❌ {step_name.capitalize()} translation of block {index} failed after 3 retries. Please check your input text.[/red]')
ValueError: [red]❌ Expressiveness translation of block 9 failed after 3 retries. Please check your input text.[/red]

@Huanshere
Copy link
Owner

可能是网络原因也可能是拒绝翻译,可以检查 error.json看看具体错误

@misslxs
Copy link

misslxs commented Nov 14, 2024

可能是网络原因也可能是拒绝翻译,可以检查 error.json看看具体错误

请问 error.json 中报错大多数是以下内容,应该如何处理呢

"message": "Missing required sub-key(s) in item 5: free"
"message": "json_repair parsing failed."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants