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

【错误】使用GEMINI时字幕翻译出错 #85

Open
AndyLin2020 opened this issue Dec 26, 2024 · 0 comments
Open

【错误】使用GEMINI时字幕翻译出错 #85

AndyLin2020 opened this issue Dec 26, 2024 · 0 comments
Labels
【错误/BUG】 出现了某种错误

Comments

@AndyLin2020
Copy link

操作系统

Docker

项目版本

最新

Python版本

No response

错误描述

翻译引擎用Gemini时会出现以下错误,不知道是不是哪里设置错误,首页助手可以正常回答问题:

JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Traceback:
File "/app/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 85, in exec_func_with_error_handling
result = func()
^^^^^^
File "/app/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 576, in code_to_exec
exec(code, module.dict)
File "/app/Chenyme-AAVT.py", line 42, in
pg.run()
File "/app/lib/python3.11/site-packages/streamlit/navigation/page.py", line 291, in run
exec(code, module.dict)
File "/app/page/project/translate.py", line 297, in
result = translate_srt(system_prompt, user_prompt, gemini_key, gemini_url, translate_option, srt_content, wait_time_setting, srt_setting)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/utils/public.py", line 1019, in translate_srt
answer = response.json()
^^^^^^^^^^^^^^^
File "/app/lib/python3.11/site-packages/requests/models.py", line 978, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

重现步骤

No response

错误截图

No response

其他信息(可选)

No response

@AndyLin2020 AndyLin2020 added the 【错误/BUG】 出现了某种错误 label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
【错误/BUG】 出现了某种错误
Projects
None yet
Development

No branches or pull requests

1 participant