text-generation-webui icon indicating copy to clipboard operation
text-generation-webui copied to clipboard

Enabling the "Listen" flag breaks the web ui after clikcing on "Apply flags/extensions and restart"

Open guispfilho opened this issue 9 months ago • 4 comments

Describe the bug

Adding or removing any extension or flags works fine. The problem arrises when I enable the "Listen" flag and clock on "Apply flags/extensions and restart", which yields a red "error" message in the UI, and lots of error strings in the terminal.

Is there an existing issue for this?

  • [X] I have searched the existing issues

Reproduction

  1. Run the Web Ui using the start_windows.bat
  2. Enable "Listen"
  3. Press "Apply flags/extensions and restart"

Screenshot

No response

Logs

This is the log after selecting "Listen" and pressing "Apply flags/extensions and restart":

23:54:01-794629 INFO     Loading the extension "gallery"
23:54:01-794629 INFO     Loading the extension "alltalk_tts-main"

Running on local URL:  http://0.0.0.0:7860

ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\queueing.py", line 223, in push
    event_queue = self.event_queue_per_concurrency_id[event.concurrency_id]
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
KeyError: '1999740642992'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 411, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 69, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\errors.py", line 186, in __call__
    raise exc
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 695, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 711, in simple_response
    await self.app(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\routes.py", line 737, in queue_join
    return await queue_join_helper(body, request, username)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\routes.py", line 755, in queue_join_helper
    success, event_id = await blocks._queue.push(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\queueing.py", line 225, in push
    raise KeyError(
KeyError: 'Event not found in queue. If you are deploying this Gradio app with multiple replicas, please enable stickiness to ensure that all requests from the same user are routed to the same instance.'
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\queueing.py", line 223, in push
    event_queue = self.event_queue_per_concurrency_id[event.concurrency_id]
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
KeyError: '1999722576320'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 411, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 69, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\errors.py", line 186, in __call__
    raise exc
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 695, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 711, in simple_response
    await self.app(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\routes.py", line 737, in queue_join
    return await queue_join_helper(body, request, username)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\routes.py", line 755, in queue_join_helper
    success, event_id = await blocks._queue.push(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\queueing.py", line 225, in push
    raise KeyError(
KeyError: 'Event not found in queue. If you are deploying this Gradio app with multiple replicas, please enable stickiness to ensure that all requests from the same user are routed to the same instance.'
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\queueing.py", line 223, in push
    event_queue = self.event_queue_per_concurrency_id[event.concurrency_id]
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
KeyError: '1999722572960'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 411, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 69, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\errors.py", line 186, in __call__
    raise exc
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 695, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 711, in simple_response
    await self.app(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\routes.py", line 737, in queue_join
    return await queue_join_helper(body, request, username)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\routes.py", line 755, in queue_join_helper
    success, event_id = await blocks._queue.push(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\queueing.py", line 225, in push
    raise KeyError(
KeyError: 'Event not found in queue. If you are deploying this Gradio app with multiple replicas, please enable stickiness to ensure that all requests from the same user are routed to the same instance.'
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\queueing.py", line 223, in push
    event_queue = self.event_queue_per_concurrency_id[event.concurrency_id]
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
KeyError: '2001054321056'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 411, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 69, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\errors.py", line 186, in __call__
    raise exc
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 695, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 711, in simple_response
    await self.app(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\routes.py", line 737, in queue_join
    return await queue_join_helper(body, request, username)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\routes.py", line 755, in queue_join_helper
    success, event_id = await blocks._queue.push(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\queueing.py", line 225, in push
    raise KeyError(
KeyError: 'Event not found in queue. If you are deploying this Gradio app with multiple replicas, please enable stickiness to ensure that all requests from the same user are routed to the same instance.'
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\queueing.py", line 223, in push
    event_queue = self.event_queue_per_concurrency_id[event.concurrency_id]
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
KeyError: '1999722574080'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 411, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 69, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\errors.py", line 186, in __call__
    raise exc
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 695, in __call__
    await self.simple_response(scope, receive, send, request_headers=headers)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\route_utils.py", line 711, in simple_response
    await self.app(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\middleware\exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\starlette\routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\fastapi\routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\routes.py", line 737, in queue_join
    return await queue_join_helper(body, request, username)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\routes.py", line 755, in queue_join_helper
    success, event_id = await blocks._queue.push(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Trabalho_UISM\Documents\text-generation-webui-main\installer_files\env\Lib\site-packages\gradio\queueing.py", line 225, in push
    raise KeyError(
KeyError: 'Event not found in queue. If you are deploying this Gradio app with multiple replicas, please enable stickiness to ensure that all requests from the same user are routed to the same instance.'

System Info

RTX 4070 - MSI
AMD 7700X
32GB DDR5
Windows 11

guispfilho avatar May 08 '24 02:05 guispfilho

Same issue on both a 2080RTX with mediocre intel cpu and dual A100 / AMD cpu set up.currently looking for a manual workaround to set IP to 0.0.0.0 instead of 127.0.0.1 when only the API is selected

iTheSailor avatar May 08 '24 16:05 iTheSailor

Same issue on both a 2080RTX with mediocre intel cpu and dual A100 / AMD cpu set up.currently looking for a manual workaround to set IP to 0.0.0.0 instead of 127.0.0.1 when only the API is selected

I’m also trying to find a workaround, but with no luck… if you manage to figure something also, please give me a heads up. I’m currently unable to host locally.

guispfilho avatar May 08 '24 19:05 guispfilho

I'm not a Dev disclaimer here. It looks to me like Gradio borked something in 4.25.0 I downgraded the Gradio requirements in requirements.txt into gradio==4.24.0 and everything is working again.

cbcotton avatar May 23 '24 14:05 cbcotton

I'm not a Dev disclaimer here. It looks to me like Gradio borked something in 4.25.0 I downgraded the Gradio requirements in requirements.txt into gradio==4.24.0 and everything is working again.

At least for me this fix is no longer valid. Downgrading gradio to 4.24.0 makes it so every button in the webui stops working.

LBrockmanK avatar Sep 22 '24 16:09 LBrockmanK