Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradio still reports processing after fatal exceptions #10668

Open
1 task done
edmcman opened this issue Feb 24, 2025 · 0 comments
Open
1 task done

Gradio still reports processing after fatal exceptions #10668

edmcman opened this issue Feb 24, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@edmcman
Copy link

edmcman commented Feb 24, 2025

Describe the bug

When a fatal exception occurs, the UI should stop the countdown and not report the status as "processing".

If show_error is False or if the user misses the error modal, the user may be confused and continue to wait (needlessly).

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr
def reverse(text):
    assert False, "oh no"
    return text[::-1]
demo = gr.Interface(reverse, "text", "text")
demo.launch(show_error=True)

Screenshot

Image

Image

Logs

Traceback (most recent call last):
  File "/home/ed/.pyenv/versions/gradio/lib/python3.10/site-packages/gradio/queueing.py", line 625, in process_events
    response = await route_utils.call_process_api(
  File "/home/ed/.pyenv/versions/gradio/lib/python3.10/site-packages/gradio/route_utils.py", line 322, in call_process_api
    output = await app.get_blocks().process_api(
  File "/home/ed/.pyenv/versions/gradio/lib/python3.10/site-packages/gradio/blocks.py", line 2096, in process_api
    result = await self.call_function(
  File "/home/ed/.pyenv/versions/gradio/lib/python3.10/site-packages/gradio/blocks.py", line 1643, in call_function
    prediction = await anyio.to_thread.run_sync(  # type: ignore
  File "/home/ed/.pyenv/versions/gradio/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "/home/ed/.pyenv/versions/gradio/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2461, in run_sync_in_worker_thread
    return await future
  File "/home/ed/.pyenv/versions/gradio/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 962, in run
    result = context.run(func, *args)
  File "/home/ed/.pyenv/versions/gradio/lib/python3.10/site-packages/gradio/utils.py", line 890, in wrapper
    response = f(*args, **kwargs)
  File "/tmp/blah.py", line 3, in reverse
    assert False, "oh no"
AssertionError: oh no

System Info

Gradio Environment Information:
------------------------------
Operating System: Linux
gradio version: 5.17.1
gradio_client version: 1.7.1

------------------------------------------------
gradio dependencies in your environment:

aiofiles: 23.2.1
anyio: 4.8.0
audioop-lts is not installed.
fastapi: 0.115.8
ffmpy: 0.5.0
gradio-client==1.7.1 is not installed.
httpx: 0.28.1
huggingface-hub: 0.29.1
jinja2: 3.1.5
markupsafe: 2.1.5
numpy: 2.2.3
orjson: 3.10.15
packaging: 24.2
pandas: 2.2.3
pillow: 11.1.0
pydantic: 2.10.6
pydub: 0.25.1
python-multipart: 0.0.20
pyyaml: 6.0.2
ruff: 0.9.7
safehttpx: 0.1.6
semantic-version: 2.10.0
starlette: 0.45.3
tomlkit: 0.13.2
typer: 0.15.1
typing-extensions: 4.12.2
urllib3: 2.3.0
uvicorn: 0.34.0
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.


gradio_client dependencies in your environment:

fsspec: 2025.2.0
httpx: 0.28.1
huggingface-hub: 0.29.1
packaging: 24.2
typing-extensions: 4.12.2
websockets: 14.2

Severity

I can work around it

@edmcman edmcman added the bug Something isn't working label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant