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
KeyError: 'heartbeat' when python client request took more than approximately 16 seconds #6319
Comments
Do you want to open a PR to fix @LeoAtlanto ? |
I'd like to and I can do that tomorrow. |
I was able to reproduce this bug and validate the fix. |
I've hit a similar error but the entry is for "log" made a similar fix. Should I open PR for this if no one else has yet? |
I tried the fix, and it is indeed solves the issue for that line of code. But we need to make sure that "heartbeat" response is treated the right way in every piece of the repo. After implementing workaround, I started to "JSONDecode" exceptions in gradio-client, meanwhile stdout of a client shows "heartbeat" response entries |
It's been 2-3 weeks with this bug, can we have fix please? Thanks! I'm unable to work around and it blocks all usage of gradio 4 after spending some time to upgrade. This should be marked as major regression. |
With "work-around" yes jsondecodeerror:
Seems like the message is truncated to 65k. |
Seems like the message is truncated to 65k. So isn't that a server problem, not client problem? |
…However, return results still truncated to 65k making audio return impossible
I added the heartbeat work-around, but the truncation is super critical. Any chance to fix soon? |
Note this doesn't just affect audio. The truncation is universal to all messages. I'll post separate issue. |
…o#5914, gradio4 is too unstable to use until various things fixed: gradio-app/gradio#6592 gradio-app/gradio#6282 gradio-app/gradio#6319 gradio-app/gradio#6601
i'm getting this error as well |
I'm getting the same error as @ryanchesler , it appeared after adding a
|
Describe the bug
Bug Info
I'm working on a project where several hosted gradio apps are connected by a python gradio client. One of the hosted gradio apps is a bit complicated and it would take about 30 seconds to finish the request. Under such circumstances, the error "KeyError: 'heartbeat'" occurs and the request fails.
Solution
/usr/local/lib/python3.10/dist-packages/gradio_client/utils.py
Add a key-value pair in function msg_to_status below line 136, or something like this:
Have you searched existing issues? 🔎
Reproduction
1.Create two scripts.
(1) host.py
(2) client.py
2.Launch two apps.
3.Use the client app to connect the host app.
Screenshot
No response
Logs
System Info
Severity
I can work around it
The text was updated successfully, but these errors were encountered: