VideoLingo icon indicating copy to clipboard operation
VideoLingo copied to clipboard

你传入的两个列表(或数组)src 和 remerged 的长度不一致

Open william0833 opened this issue 1 year ago • 3 comments

这个错误 (ValueError: All arrays must be of the same length) 表明在创建 DataFrame 时,你传入的两个列表(或数组)src 和 remerged 的长度不一致。具体来说,在以下代码行中: ValueError: All arrays must be of the same length Traceback: File "/Volumes/newhidd/anaconda/anaconda3/envs/videolingo/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling result = func() File "/Volumes/newhidd/anaconda/anaconda3/envs/videolingo/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 590, in code_to_exec exec(code, module.dict) File "/Users/yuhong/VideoLingo/st.py", line 123, in main() File "/Users/yuhong/VideoLingo/st.py", line 119, in main text_processing_section() File "/Users/yuhong/VideoLingo/st.py", line 33, in text_processing_section process_text() File "/Users/yuhong/VideoLingo/st.py", line 57, in process_text step5_splitforsub.split_for_sub_main() File "/Users/yuhong/VideoLingo/core/step5_splitforsub.py", line 131, in split_for_sub_main pd.DataFrame({'Source': src, 'Translation': remerged}).to_excel(OUTPUT_REMERGED_FILE, index=False) File "/Volumes/newhidd/anaconda/anaconda3/envs/videolingo/lib/python3.10/site-packages/pandas/core/frame.py", line 778, in init mgr = dict_to_mgr(data, index, columns, dtype=dtype, copy=copy, typ=manager) File "/Volumes/newhidd/anaconda/anaconda3/envs/videolingo/lib/python3.10/site-packages/pandas/core/internals/construction.py", line 503, in dict_to_mgr return arrays_to_mgr(arrays, columns, index, dtype=dtype, typ=typ, consolidate=copy) File "/Volumes/newhidd/anaconda/anaconda3/envs/videolingo/lib/python3.10/site-packages/pandas/core/internals/construction.py", line 114, in arrays_to_mgr index = _extract_index(arrays) File "/Volumes/newhidd/anaconda/anaconda3/envs/videolingo/lib/python3.10/site-packages/pandas/core/internals/construction.py", line 677, in _extract_index raise ValueError("All arrays must be of the same length")

请问这种情况是什么意思?怎么解决

william0833 avatar Dec 17 '24 08:12 william0833

换更聪明的模型。

Lorde627 avatar Dec 20 '24 09:12 Lorde627

我用的 gemini-2.0-flash-exp 也报这个错误,这个也不够聪明吗?

shaoxiang avatar Dec 23 '24 01:12 shaoxiang

I've fixed this bug:https://github.com/Huanshere/VideoLingo/pull/347 我已经修改了这个bug

Napbad avatar Dec 27 '24 16:12 Napbad