Closed Quajijalon closed 1 year ago
Hey @Quajijalon ! Thanks for the report. So I tried this example code, and I did not get the error. I think you meant count == 0
? I don't think there's much I can do because I think it's related to Streamlit's Experimental Rerun. See https://github.com/streamlit/streamlit/issues/5537
Essentially, session state changes in a script run seem to be lost on experimental rerun, which could be causing the issue.
Hope that helps. I recommend commenting on the Streamlit issue.
In the following code snippet, once the count == 1, an error will occur stating that the attr 'a' is not in the session state.
Not only has the session state been emptied, the experimental rerun doesn't seem to run from the start, otherwise it would have re-added that attr to the session state.