I am utterly baffled.
I’m running Streamlit 1.38.0 locally on a Windows machine but every time it reaches a certain point in a basic form the entire process dies without showing any error. I wasn’t even sure what was happening at first, as it was a completely silent death. At least until I looked at the terminal and realized the process wasn’t even running anymore.
> streamlit run .\Welcome_Page.py
You can now view your Streamlit app in your browser.
Local URL: http://localhost:8501
Network URL: http://10.83.178.195:8501
Starting form
Left column done
Right column done
Write statement done
Comment statement done
>
This happens 100% of the time when I try to load this page. The last few lines above are just Python print statements I added between every line to try and figure out where, since there’s no other feedback.
The line in question where it dies is:
selected = st.feedback("thumbs", key="thumbs-{}".format(st.session_state.count))
What’s wrong with that? I have absolutely no idea.
Since there’s so little info here I attempted to run with logger.level set to DEBUG and now it dies on the completely static welcome page:
> streamlit run .\Welcome_Page.py --logger.level DEBUG
2024-09-10 12:10:27.795 Starting server...
2024-09-10 12:10:27.796 Serving static content from c:\Users\DKettle1\code\qtm-engg-evaluation-system\.venv\Lib\site-packages\streamlit\static
2024-09-10 12:10:27.802 Server started on port 8501
2024-09-10 12:10:27.803 Runtime state: RuntimeState.INITIAL -> RuntimeState.NO_SESSIONS_CONNECTED
You can now view your Streamlit app in your browser.
Local URL: http://localhost:8501
Network URL: http://10.83.178.195:8501
2024-09-10 12:10:30.673 Setting up signal handler
2024-09-10 12:10:33.062 No singleton. Registering one.
2024-09-10 12:10:33.167 Watcher created for C:\Users\DKettle1\code\qtm-engg-evaluation-system\pages
2024-09-10 12:10:33.171 Watcher created for C:\Users\DKettle1\code\qtm-engg-evaluation-system\Welcome_Page.py
2024-09-10 12:10:33.173 Watcher created for C:\Users\DKettle1\code\qtm-engg-evaluation-system\pages\Data_Explorer.py
2024-09-10 12:10:33.175 Watcher created for C:\Users\DKettle1\code\qtm-engg-evaluation-system\pages\Reference_Response_Reviewer.py
2024-09-10 12:10:33.175 AppSession initialized (id=a28b9795-d7d9-4b48-a511-dfdabb6708f4)
2024-09-10 12:10:33.176 Created new session for client 2581872582480. Session ID: a28b9795-d7d9-4b48-a511-dfdabb6708f4
2024-09-10 12:10:33.176 Runtime state: RuntimeState.NO_SESSIONS_CONNECTED -> RuntimeState.ONE_OR_MORE_SESSIONS_CONNECTED
>
Yes that’s right, setting the log level to DEBUG makes the process die sooner. For some reason. You tell me why, I certainly can’t understand it. But I have a couple different pages here and without the log level set to DEBUG I can at least navigate to the page with the form before it dies. With log level set to DEBUG it dies loading the welcome page that’s completely static and only has links to the other pages. This is the entire welcome page:
import streamlit as st
st.set_page_config(
page_title="Welcome Page"
)
st.write("# Welcome")
st.markdown("""
### Reference Response Reviewer
Tool for human review of reference responses.
### Data Explorer
Tool to dive into system responses and scores.
""")
That’s it. It can’t load that without the process dying when DEBUG is set…
Am I going crazy? I feel like I’m going crazy.