You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m running a project using Gradio and encountered the following error in the log:
"When localhost is not accessible, a shareable link must be created. Please set share=True or check your proxy settings to allow access to localhost."
I need my proxy enabled, so I decided to set share=True and restart the program. However, the issue is that when I open the webpage and click the Gradio dropdown component, another Gradio component—which depends on the dropdown’s change event to trigger—keeps loading indefinitely.
I spent a lot of time troubleshooting this, and I finally found the reason:
This project uses the code above to run startup events. However, when localhost is inaccessible, the request fails, and the startup events are not running.
When I click the dropdown component, it sends a request to the server, which then pushes an event to the queue. But since the startup events haven’t been executed, the queue isn’t processed, causing the webpage to keep loading forever.
Solution:
Raise an error when localhost is inaccessible and print the error message to the console. This way, users can see the error and address the issue.
I’m running a project using Gradio and encountered the following error in the log:
"When localhost is not accessible, a shareable link must be created. Please set share=True or check your proxy settings to allow access to localhost."
I need my proxy enabled, so I decided to set share=True and restart the program. However, the issue is that when I open the webpage and click the Gradio dropdown component, another Gradio component—which depends on the dropdown’s change event to trigger—keeps loading indefinitely.
I spent a lot of time troubleshooting this, and I finally found the reason:
gradio/blocks.py#L2650
This project uses the code above to run startup events. However, when localhost is inaccessible, the request fails, and the startup events are not running.
When I click the dropdown component, it sends a request to the server, which then pushes an event to the queue. But since the startup events haven’t been executed, the queue isn’t processed, causing the webpage to keep loading forever.
Solution:
Raise an error when localhost is inaccessible and print the error message to the console. This way, users can see the error and address the issue.
Setting
share=True
doesn’t actually solve the problem because the startup events still require a request to the server via localhost.The text was updated successfully, but these errors were encountered: