I feel like I have stumbled upon something now, just not sure how to interpret it, or if there is some weird user error on my end.
I have installed Streamlit 1.24.0 once again, next I have created a new “app”, just a new Home.py file inside of a folder called “streamlit-test” and it contains the most simplest of code.
import streamlit as st
I then run this in the following way on my Ubuntu 22.04 LTS server,
streamlit run Home.py &
It all starts up fine and I can access the page.
I then start up Visual Studio Code and open the folder and Home.py file.
I then add the line st.write(“new line”) at the end of the file, then Ctrl + S (Save)
Go back into browser and my streamlit app, press R to ReRun and the line that I added does not show up.
If I go into the ubuntu terminal I can see that the file has updated with the line. So the file has been updated, its just that Streamlit doesn’t seem to notice that it has.
Next if instead open the file in the terminal, “vi Home.py”, add the line st.write(“added from vi”), “:wq!” (save the file). Go into the browser and my streamlit, and now it actually shows on the top right that it has detected a source file update “Source file changed.” I then press R to ReRun and all of a sudden it updates. I see both the line that I added from Visual Studio Code and VI (terminal).
So to summarize this part, any update that I make in Visual Studio Code (I tried Sublime as well) does not seem to trigger an update to Streamlit even though it is there in the file. If i write it directly to the file using VI it works.
Now for the “weird part”, next I uninstall Streamlit 1.24.0 and install Streamlit 1.20.0 instead.
Go into the same “streamlit-test” folder, and start the same app I was using for 1.24.0.
streamlit run Home.py &
App starts up fine and I see all the edits I previously made while tinkering with 1.24.0
With the file (Home.py) still open in Visual Studio Code I make an edit, add st.write(“line from vsc”) and the end of the file, Ctrl + S (Save).
Go back into browser and my app, press R to ReRun and it instantly updates with the new line I added.
So to summarize again, with 1.20.0 I can update from VSC and get it to show up instantly when I ReRun (R), but in 1.24.0 the same procedure does not work, even though its the same app/file and the only thing that has changed is the Streamlit version.
And just to state, I have been updating my file/app using VSC in this way throughout all my usage of Streamlit (1-2 years), but now with 1.24.0 it seems to be not be working for some reason.
Not sure if any of this makes sense?