Gradio in colabs not running - same code locally works fine

Hi there,
i`ve got a litte Bot using the openai-API and gradio that I would like to get running via google colabs. Everything is working fine locally. The same code in colabs just wound run. I pip installes gradio (and upgraded…just to be sure) and openai.
The gradio ChatInterface appears but as soon as I am trying to send a message to the bot I get stuck. Debug-Mode gives the following output.:

Colab notebook detected. This cell will run indefinitely so that you can see errors and logs. To turn off, set debug=False in launch().
Note: opening Chrome Inspector may crash demo inside Colab notebooks.

To create a public link, set share=True in launch().

Running on https://localhost:7860/

ERROR: Exception in ASGI application
Traceback (most recent call last):
File “/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/h11_impl.py”, line 408, in run_asgi
result = await app( # type: ignore[func-returns-value]
File “/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py”, line 84, in call
return await self.app(scope, receive, send)
File “/usr/local/lib/python3.10/dist-packages/fastapi/applications.py”, line 1106, in call
await super().call(scope, receive, send)
File “/usr/local/lib/python3.10/dist-packages/starlette/applications.py”, line 122, in call
await self.middleware_stack(scope, receive, send)
File “/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py”, line 184, in call
raise exc
File “/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py”, line 162, in call
await self.app(scope, receive, _send)
File “/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py”, line 91, in call
await self.simple_response(scope, receive, send, request_headers=headers)
File “/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py”, line 146, in simple_response
await self.app(scope, receive, send)
File “/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py”, line 79, in call
raise exc
File “/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py”, line 68, in call
await self.app(scope, receive, sender)
File “/usr/local/lib/python3.10/dist-packages/fastapi/middleware/asyncexitstack.py”, line 20, in call
raise e
File “/usr/local/lib/python3.10/dist-packages/fastapi/middleware/asyncexitstack.py”, line 17, in call
await self.app(scope, receive, send)
File “/usr/local/lib/python3.10/dist-packages/starlette/routing.py”, line 718, in call
await route.handle(scope, receive, send)
File “/usr/local/lib/python3.10/dist-packages/starlette/routing.py”, line 276, in handle
await self.app(scope, receive, send)
File “/usr/local/lib/python3.10/dist-packages/starlette/routing.py”, line 66, in app
response = await func(request)
File “/usr/local/lib/python3.10/dist-packages/fastapi/routing.py”, line 274, in app
raw_response = await run_endpoint_function(
File “/usr/local/lib/python3.10/dist-packages/fastapi/routing.py”, line 191, in run_endpoint_function
return await dependant.call(**values)
File “/usr/local/lib/python3.10/dist-packages/gradio/routes.py”, line 661, in queue_data
blocks._queue.attach_data(body)
File “/usr/local/lib/python3.10/dist-packages/gradio/queueing.py”, line 132, in attach_data
raise ValueError(“Event not found”, event_id)
ValueError: (‘Event not found’, ‘82efb9d9674c4ef7aad670b356a0e356’)

Any ideas on that?
Greatings

1 Like