During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 556, in _run_script
exec(code, module.dict)
File “/Users/x/myproject.py/app.py”, line 117, in
api_key = st.secrets[‘api_key’]
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/streamlit/runtime/secrets.py”, line 228, in getitem
raise KeyError(_missing_key_error_message(key))
KeyError: ‘st.secrets has no key “api_key”. Did you forget to add it to secrets.toml or the app settings on Streamlit Cloud? More info: Secrets management - Streamlit Docs’