Closed sultan7577 closed 5 months ago
Hi @sultan7577 can you please provide a minimal code example that we can use to reproduce the issue above? See: https://stackoverflow.com/help/minimal-reproducible-example
In the meantime, just looking through the code, it seems like you are trying to mount a gradio application within a larger fastapi application. If you are doing that, you need to follow a specific pattern, please see the docs: https://www.gradio.app/docs/mount_gradio_app https://www.gradio.app/guides/sharing-your-app#mounting-within-another-fast-api-app
Pardon me for asking but since im new to this, can you clarify what do you mean by minimal reproducible code example?
Hi @sultan7577 a small, self-contained example which has the same bug that you're experiencing. It should not include external dependencies whenever possible. See https://stackoverflow.com/help/minimal-reproducible-example
This error happens when you try to launch gradio outside the main thread. Since you're not using FastAPI, I think you'll have to start the gradio app and your flask app in separate processes.
This error happens when you try to launch gradio outside the main thread. Since you're not using FastAPI, I think you'll have to start the gradio app and your flask app in separate processes.
Thank you very much for the review, i will try to work on this.
Hi @sultan7577 a small, self-contained example which has the same bug that you're experiencing. It should not include external dependencies whenever possible. See https://stackoverflow.com/help/minimal-reproducible-example
Thank you for your review, i will try to figure it out as you guys mentioned.
Closing for now, thanks folks!
Describe the bug
TypeError: 'NoneType' object does not support the asynchronous context manager protocol, is typically raised when you're trying to use an object as an asynchronous context manager (i.e., using it in an async with statement), but the object is None.
In your case, it seems like the pending_message_lock attribute of the self object (which appears to be an instance of a class from the gradio library) is None. This could be due to a variety of reasons, such as:
The pending_message_lock attribute not being properly initialized. The pending_message_lock attribute being accidentally overwritten somewhere in the code. An issue with the gradio library itself.
Hello eveyrone, hope you are doing well. I am relatively new to gradio and am not an expert in here, I am getting the above error for a long time, and even after trying out different things, am not able to solve it on my own. I would appreciate your help
Have you searched existing issues? 🔎
Reproduction
Screenshot
Logs
System Info
Severity
Blocking usage of gradio