Skip to content
Sign upLog in

How to get os.environ['SECRET'] working for other users?

Profile icon

I have been trying to get a program to work in Replit apps with secrets contained in it, like in this example.
But as you can see, it raises KeyError as if the secret's key is wrong. This works completely fine for me when I'm logged in.
I read the documentation for this, but it doesn't make sense that an unedited version of the code would restrict the use of secrets.
Am I missing something obvious?

You are viewing a single comment. View All
Answered by CosmicBear [earned 5 cycles]
View Answer
Profile icon

It's surprising because most of the time my advice just causes more problems but IT HELPED?!?

Anyways I've never learned python so I'm no help, but I think I know a guy that can help you.


Are ye willing to take da challenge? The choice is up to you.