linyqh / NarratoAI

利用AI大模型,一键解说并剪辑视频; Using AI models to automatically provide commentary and edit videos with a single click.
MIT License
1.8k stars 215 forks source link

生成脚本时候报错,看看什么原因 #10

Closed baobao9999 closed 2 months ago

baobao9999 commented 2 months ago

生成脚本时候报错,看看什么原因,有的视频可以正常生成视频脚本

webui | 2024-08-23 13:40:41 | DEBUG | "./app/services/llm.py:448": gemini_video2json - 视频名称: ./resource/videos/未命名11.mov webui | 2024-08-23 13:41:47 | DEBUG | "./app/services/llm.py:451": gemini_video2json - 上传视频至 Google cloud 成功: files/2janw7hez7hf webui | 2024-08-23 13:41:49 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:41:51 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:41:53 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:41:55 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:41:57 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:41:59 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:01 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:04 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:05 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:07 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:09 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:11 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:13 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:15 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:17 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:19 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:21 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:23 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): ACTIVE webui | 2024-08-23 13:42:51.367 Uncaught app exception webui | Traceback (most recent call last): webui | File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 584, in _run_script webui | exec(code, module.dict) webui | File "/NarratoAI/webui/Main.py", line 352, in webui | script = llm.gemini_video2json( webui | File "/NarratoAI/app/services/llm.py", line 466, in gemini_video2json webui | response.append(chunk.text) webui | File "/usr/local/lib/python3.10/site-packages/google/generativeai/types/generation_types.py", line 436, in text webui | raise ValueError( webui | ValueError: Invalid operation: The response.text quick accessor requires the response to contain a valid Part, but none were returned. Please check the candidate.safety_ratings to determine if the response was blocked.

EasonRAY1307 commented 2 months ago

你的api和key没问题嘛?

baobao9999 commented 2 months ago

你的api和key没问题嘛?

应该没问题的, 都是按照流程申请的。

EasonRAY1307 commented 2 months ago

我的总是显示网络无法连接,你用的代理?

EasonRAY1307 commented 2 months ago

用的梯子好像不行

linyqh commented 2 months ago

生成脚本时候报错,看看什么原因,有的视频可以正常生成视频脚本

webui | 2024-08-23 13:40:41 | DEBUG | "./app/services/llm.py:448": gemini_video2json - 视频名称: ./resource/videos/未命名11.mov webui | 2024-08-23 13:41:47 | DEBUG | "./app/services/llm.py:451": gemini_video2json - 上传视频至 Google cloud 成功: files/2janw7hez7hf webui | 2024-08-23 13:41:49 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:41:51 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:41:53 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:41:55 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:41:57 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:41:59 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:01 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:04 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:05 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:07 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:09 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:11 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:13 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:15 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:17 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:19 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:21 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): PROCESSING webui | 2024-08-23 13:42:23 | DEBUG | "./app/services/llm.py:456": gemini_video2json - 视频当前状态(ACTIVE才可用): ACTIVE webui | 2024-08-23 13:42:51.367 Uncaught app exception webui | Traceback (most recent call last): webui | File "/usr/local/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 584, in _run_script webui | exec(code, module.dict) webui | File "/NarratoAI/webui/Main.py", line 352, in webui | script = llm.gemini_video2json( webui | File "/NarratoAI/app/services/llm.py", line 466, in gemini_video2json webui | response.append(chunk.text) webui | File "/usr/local/lib/python3.10/site-packages/google/generativeai/types/generation_types.py", line 436, in text webui | raise ValueError( webui | ValueError: Invalid operation: The response.text quick accessor requires the response to contain a valid Part, but none were returned. Please check the candidate.safety_ratings to determine if the response was blocked.

尝试更换梯子的区域;可以试试新加坡,日本,美国等;