While deploying my web app on streamlit cloud, facing error- “KeyError: 'st.secrets has no key “DETA_KEY”. Did you forget to add it to secrets.toml or the app settings on Streamlit Cloud?”
But I have already defined the environment variable in the secrets in streamlit cloud. So why am I seeing this error?
Log screenshot is here-
Thanks for posting!
Can you share a code snippet that shows where you set the value of
In the secrets section of streamlit cloud…
I suspect the error is because you’ve incorrectly included the theme config in secrets. So the app is currently looking for
st.secrets['DETA_KEY'], but the secrets are actually in
Could you try removing the theme section, reboot your app, and see if that helps?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.