python应用在运行的时候报错,部分错误信息如下:
File “D:\dy\ProPainter20250118\env\lib\site-packages\gradio\routes.py”, line 604, in join_queue
session_info = await asyncio.wait_for(
File “D:\dy\ProPainter20250118\env\lib\asyncio\tasks.py”, line 445, in wait_for
return fut.result()
File “D:\dy\ProPainter20250118\env\lib\site-packages\starlette\websockets.py”, line 133, in receive_json
self._raise_on_disconnect(message)
File “D:\dy\ProPainter20250118\env\lib\site-packages\starlette\websockets.py”, line 105, in _raise_on_disconnect
raise WebSocketDisconnect(message[“code”])
starlette.websockets.WebSocketDisconnect: 1006
发现gradio应用里启动了enable_queue,把enable_queue=True删除就可以了
app.queue(concurrency_count=1)
app.launch(debug=True, enable_queue=True, share=True)
还是不行的话,就继续把app.queue这行代码删除