st_folium keeps reloading Streamlit page till page crashes
See original GitHub issueStreamlit page keeps reloading every 3 seconds till it crashes. Now I use st_static that is not recommended ?
st_data = st_folium(m, key='map',width = 650, height = 600)
Any idea what is happening ?
Issue Analytics
- State:
- Created a year ago
- Comments:13 (2 by maintainers)
Top Results From Across the Web
Issues · randyzwitch/streamlit-folium - GitHub
Contribute to randyzwitch/streamlit-folium development by creating an account ... st_folium keeps reloading Streamlit page till page crashes.
Read more >How to prevent the reloading of the whole page when I let the ...
Hello everyone, I am building a page which let the user to run a query against my database, once I have the data...
Read more >Strange and Subtle Refresh Streamlit Bugs
Sometimes an entire streamlit app crashes unexpectedly and the page needs to be refreshed. This can happen either when entering input or ...
Read more >Streamlit App Crashes Unexpectedly After First Successful ...
When I reload/rerun the webpage still does not fixes the issue. Moreover, when the application crashes it is unable to be recovered unless ......
Read more >Avoiding refreshing the entire page when clicking a button
My issue right now is that when the user presses the button, the entire page reloads. I understand why this is the case...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@PaulShin83 I don’t see that issue when I fun the following script with streamlit==1.11.0 and streamlit-folium==0.6.13
I know this isn’t exactly the same as your script, but I’m unable to run your exact example without the full script. It’s possible that the issue you’re encountering is related to something happening with session state (e.g. perhaps rendering the map -> updates session state -> rerendering the map -> …). Would you be able to share the full script, or a complete subset of it that shows the infinite-reload issue?
@tonkolviktor Thanks for sharing that example code! In this case, it seems to be behaving as expected – I don’t see it reloading over and over again. The “running guy” does trigger, but that is because the map is returning different values. If you want to avoid this, you can pass
returned_objects=[]
tost_folium
, to make it return nothing (and essentially behave like folium_static. But, you can also still have it return some data if you want it to. If you want to avoid the “running guy”, thereturned_objects=[]
will always be available. I may even keep folium_static and simply make it call st_folium with that argument passed in. But, if there are cases where st_folium produces an infinite-rerun, I definitely want to fix those before changing folium_static to work that way.