Update error message to show dataframes and charts (when used as widgets) can't be assigned values through Session State #8715
Labels
area:widgets
feature:st.session_state
status:confirmed
Bug has been confirmed by the Streamlit team
type:bug
Something isn't working
Checklist
Summary
For the current
streamlit-nightly
and soon-to-be 1.35.0, we've introduced turning dataframes and some charts into widgets. Their values cannot be assigned through Session State.Reproducible Code Example
Steps To Reproduce
Run the code and observe the (expected) error:
streamlit/lib/streamlit/elements/utils.py
Lines 43 to 46 in 1b73b44
Expected Behavior
The error message should include the newly introduced read-only widgets:
st.dataframe
,st.vega_lite_chart
,st.altair_chart
, andst.plotly_chart
.Current Behavior
Error displayed from here:
SESSION_STATE_WRITES_NOT_ALLOWED_ERROR_TEXT = """
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.
"""
Is this a regression?
Debug info
Additional Information
No response
The text was updated successfully, but these errors were encountered: