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
AttributeError: st.session_state has no attribute "last_time". Did you forget to initialize it? More info: https://docs.streamlit.io/library/advanced-features/session-state#initialization
It comes from this line. The fix seems to be easy (avoid using the dot notation when the key doesn't exist)
if "last_time" not in st.session_state:
st.session_state.last_time = datetime.datetime.now()
_track_user()
The text was updated successfully, but these errors were encountered:
@rawmean How did you patch this in your code without streamlit-analytics having pushed it?
Try this:
'''
if "last_time" not in st.session_state:
st.session_state[last_time] = datetime.datetime.now()
_track_user()
'''
I get the following error:
It comes from this line. The fix seems to be easy (avoid using the dot notation when the key doesn't exist)
The text was updated successfully, but these errors were encountered: