modelscope / modelscope-studio

Apache License 2.0
26 stars 4 forks source link

使用modelscope_scope代理创空间,出现错误 #26

Open Hardwell99 opened 4 days ago

Hardwell99 commented 4 days ago

项目B使用 modelscope_studio 代理非公开创空间项目A,出现错误: modelscope_studio 版本1.15.0。gradio版本4.31.3 项目A中使用 gradio.Gallery 组件绑定了.select事件,通过 event:Gradio.SelecctData 获取 event.index 可以正常获取到

但是在项目B中,获取无法正常获取到,Gradio.SelecctData 为空 项目A报错显示 Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/gradio/queueing.py", line 528, in process_events response = await route_utils.call_process_api( File "/usr/local/lib/python3.10/site-packages/gradio/route_utils.py", line 270, in call_process_api output = await app.get_blocks().process_api( File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1908, in process_api result = await self.call_function( File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1471, in call_function processed_input, progress_index, _ = special_args( File "/usr/local/lib/python3.10/site-packages/gradio/helpers.py", line 937, in special_args inputs.insert(i, type_hint(event_data.target, event_data._data)) File "/usr/local/lib/python3.10/site-packages/gradio/events.py", line 112, in __init__ self.index: int | tuple[int, int] = data["index"] TypeError: 'NoneType' object is not subscriptable 项目B报错显示: Traceback (most recent call last): File "N:\PythonVenv\TongYong\lib\site-packages\gradio\queueing.py", line 528, in process_events response = await route_utils.call_process_api( File "N:\PythonVenv\TongYong\lib\site-packages\gradio\route_utils.py", line 270, in call_process_api output = await app.get_blocks().process_api( File "N:\PythonVenv\TongYong\lib\site-packages\gradio\blocks.py", line 1908, in process_api result = await self.call_function( File "N:\PythonVenv\TongYong\lib\site-packages\gradio\blocks.py", line 1485, in call_function prediction = await anyio.to_thread.run_sync( File "N:\PythonVenv\TongYong\lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( File "N:\PythonVenv\TongYong\lib\site-packages\anyio\_backends\_asyncio.py", line 2177, in run_sync_in_worker_thread return await future File "N:\PythonVenv\TongYong\lib\site-packages\anyio\_backends\_asyncio.py", line 859, in run result = context.run(func, *args) File "N:\PythonVenv\TongYong\lib\site-packages\gradio\utils.py", line 808, in wrapper response = f(*args, **kwargs) File "N:\PythonVenv\TongYong\lib\site-packages\gradio_client\client.py", line 1116, in _inner predictions = _predict(*data) File "N:\PythonVenv\TongYong\lib\site-packages\gradio_client\client.py", line 1232, in _predict raise AppError( gradio_client.exceptions.AppError: The upstream Gradio app has raised an exception: 'NoneType' object is not subscriptable

issue关联:modelsope_studio; gradio; gradio_client

Col0ring commented 4 days ago

modelscope_studio 并没有1.15.0这个版本,有具体的代码示例吗。