Issue with new Secrets feature

Is the streamlit secrets feature fully live? I can’t seem to get any environment variables from “Secrets” to propagate to my app even when copy-pasting from the secrets documentation.

Hi @Benjamin-Etheredge, welcome to the Streamlit community!

I haven’t heard of any other issues or any staggered rollout. I wonder if the secrets docs might have a subtle TOML formatting error or something. Can you post your code (without your actual secrets, obviously).

Best,
Randy

You may be right about a subtle issue with the TOML. I’m not fluent enough in TOML to say definitively, but it looks simple enough.

The TOML I added to “Secrets” section of my app is super simple and one line:

MLFLOW_TRACKING_URI = “https://website.here

I modified my app (which works locally) with a simple printer at the beginning to print out the environment variable to be sure it is set. It prints “None” on the share.steramlit.io site.

For reference, it’s hosted here: “https://share.streamlit.io/benjamin-etheredge/gloves/gui/src/app.py

I’ve solved it. I have “streamlit==0.80.0” (latest version I believe) in my requirements. It seems installing/reinstalling streamlit in the share service causes the secret functionality to break.

1 Like

Glad you got it figured out, but that sounds like a bug. Streamlit >= 0.80 is required to use secrets, so specifying that in the requirements file should be the solution (not the problem!)