TypeError: 'NoneType' object is not subscriptable 大佬求解
SunyQhZ520 opened this issue · 2 comments
{"status_code": 400, "request_id": "7f139db8-f6dc-9886-9be7-b6fff2ba5af3", "code": "InvalidParameter", "message": "Range of input length should be [1, 30000]", "output": null, "usage": null}
Traceback (most recent call last):
File "C:\Users\user1.conda\envs\funtest\lib\site-packages\gradio\queueing.py", line 521, in process_events
response = await route_utils.call_process_api(
File "C:\Users\user1.conda\envs\funtest\lib\site-packages\gradio\route_utils.py", line 276, in call_process_api
output = await app.get_blocks().process_api(
File "C:\Users\user1.conda\envs\funtest\lib\site-packages\gradio\blocks.py", line 1935, in process_api
result = await self.call_function(
File "C:\Users\user1.conda\envs\funtest\lib\site-packages\gradio\blocks.py", line 1513, in call_function
prediction = await anyio.to_thread.run_sync(
File "C:\Users\user1.conda\envs\funtest\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "C:\Users\user1.conda\envs\funtest\lib\site-packages\anyio_backends_asyncio.py", line 2177, in run_sync_in_worker_thread
return await future
File "C:\Users\user1.conda\envs\funtest\lib\site-packages\anyio_backends_asyncio.py", line 859, in run
result = context.run(func, *args)
File "C:\Users\user1.conda\envs\funtest\lib\site-packages\gradio\utils.py", line 832, in wrapper
response = f(*args, **kwargs)
File "D:\test\FunClip\funclip\launch.py", line 100, in llm_inference
return call_qwen_model(apikey, model, user_content+'\n'+srt_text, system_content)
File "D:\test\FunClip\funclip\llm\qwen_api.py", line 26, in call_qwen_model
return responses['output']['choices'][0]['message']['content']
TypeError: 'NoneType' object is not subscriptable
"Range of input length should be [1, 30000]",输入给大语言模型的srt长度超限
原因一般是视频太长了,可以手动切分一下视频