error with env files please help (might be repl's fault)
BenjaminNamika1 (20)

I found an error with .env files. env files do not work in python if you click on the "box with arrow" to run the program in a new window. Then the os.getenv("key") returns None even if you have something with a key of none. for example:
click on this link and it will print None
while if you look run the code- (the code for the above program) then you will see it will print "hello everyone". in the file the actual .env file won't be displayed so a created a file called env wich will contain the exact same text as the .env file.
I think this might be a problem with repl....

You are viewing a single comment. View All
Answered by ash15khng (393) [earned 5 cycles]
View Answer
mat1 (2498) links and logged-out users can't access the env file due to security reasons.

BenjaminNamika1 (20)

@mat1 what do you exactly mean when i was runing it in a new window i was loged in? i know that you can's see the .env so i created a copy called "env"