KeyError: 'st.session_state has no key "$$GENERATED_WIDGET_ID--None". Did you forget to initialize it? More info:

This is rather perplexing, I will need to find a way to recreate this error first, only then will I be able to debug it. Thank you for your patience.

My Python version is 3.10.10


Try a fresh installation:

git clone
cd Streamlit-Authenticator
python -m venv .venv
pip install -r requirements.txt
streamlit run 

Do login, stop app, reload, stop again and reload it again. It should pop the error when app starts.

Error happens in Mac M1 and Ubuntu 20.04, didn’t tested it in Windows.

I had a clue of the error.

I’ve tried to use streamlit_cookies_manager and it uses @st.cache, poping up a deprecation warning. When I modified streamlit_cookies_manager to use @st.cache_data the same error happened!

Maybe the error has something to do with new cache_data decorator.

1 Like