In the new version of Streamlit 1.23.1 the app is changing only after I cancel my current “streamlit run app.py” and run it again. In previous versions a simple refresh on the page would update the app in http://localhost:8501/ with the code. Am I missing something?
@Caroline sure. Here’s the code. Save it to script, say, “app.py” and use “streamlit run app.py” then, try to change some text inside the text strings and see if it changes:
import streamlit as st
# Tabs
tab1, tab2, tab3, tab4 = st.tabs(["TAB1",
"TAB2",
"TAB3",
"TAB4"])
with tab1:
col1, col2, col3 = st.columns(3)
with col1:
"""
### Test
"""
with col3:
st.video("https://www.youtube.com/watch?v=R2nr1uZ8ffc")
with col2:
"""
### Test2
a table:
"""
table_html = """
<table id="my-table">
<thead>
<tr>
<th>Var 1</th>
<th>Var 2</th>
<th>Var 3</th>
</tr>
</thead>
<tbody>
<tr>
<td>A</td>
<td>B</a></td>
<td>C</td>
</tr>
</tbody>
</table>
"""
st.markdown(table_html, unsafe_allow_html=True)
with col2:
"""
### Test3
Delete this line after run 1
Delete this line after run 2
"""
I also noticed this error appears in my command prompt:
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\threading.py", line 980, in _bootstrap_inner
self.run()
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\watchdog\observers\api.py", line 204, in run
self.dispatch_events(self.event_queue)
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\watchdog\observers\api.py", line 380, in dispatch_events
handler.dispatch(event)
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\watchdog\events.py", line 276, in dispatch
{
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\streamlit\watcher\event_based_path_watcher.py", line 374, in on_moved
self.handle_path_change_event(event)
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\streamlit\watcher\event_based_path_watcher.py", line 354, in handle_path_change_event
new_md5 = util.calc_md5_with_blocking_retries(
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\streamlit\watcher\util.py", line 56, in calc_md5_with_blocking_retries
content = _get_file_content_with_blocking_retries(path)
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\streamlit\watcher\util.py", line 91, in _get_file_content_with_blocking_retries
with open(file_path, "rb") as f:
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\user\\Downloads\\test.py'
test.py is the script I’m running as a test to edit and see if it changes the app.
I tried to reinstall streamlit on my office computer but had no success in tackling this issue.
I think perhaps it could be related to admin rights problem in the version 1.23 of streamlit. On my home computer I have admin rights, but in the office computer I do not. The error I’m having is the one I posted above, the one which appears on the gif below.
Downgrading Streamlit from 1.23.1 to 1.22.0 with pip install --force-reinstall -v "streamlit<1.23.0" completely solves the issue as you can see on the second gif below. I’ll be doing that for now but I hope it gets fixed in 1.23 because I need the newer features like support for Altair 5.0
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.