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
streamlit.errors.StreamlitAPIException: Values for st.button, st.download_button, st.file_uploader, and st.form cannot be set using st.session_state.
#21
import streamlit as st
import streamlit_authenticator as stauth
from CRM.setupdb import loaddb
def crm(conn, c):
st.title("Log In")
loaddb(conn, c)
print(c.execute("SELECT email FROM userTable").fetchall())
authenticator = stauth.Authenticate(c.execute("SELECT email FROM userTable").fetchall(), c.execute("SELECT username FROM userTable").fetchall(), c.execute("SELECT password FROM userTable").fetchall(), "CRM", "CRM")
name, authentication_status = authenticator.login('Login', 'main')
The text was updated successfully, but these errors were encountered:
I am not sure exactly what is happening, but I suspect that it is cause by the line 'st.session_state.update(st.session_state)'. If you are trying to update a session state in Streamlit, it is best to do it as such: st.session_state['key'] = 'new value'.
StreamlitAPIException(SESSION_STATE_WRITES_NOT_ALLOWED_ERROR_TEXT)
streamlit.errors.StreamlitAPIException:
Values for st.button, st.download_button, st.file_uploader, st.data_editor,
st.chat_input, and st.form cannot be set using st.session_state.
I'm new to streamlit, and I thought this would be an easy thing to do, as it is in most languages.
I just need to clear everything out after a user is done processing so they can start a new entry. Is there a way to call a function in streamlit to reset or clear all the streamlit controls?
When I run my code, Streamlit throws an API exception. Here is the code that is concerns this problem:
The text was updated successfully, but these errors were encountered: