HBNetwork / python-decouple

Strict separation of config from code.
MIT License
2.83k stars 196 forks source link

Having problems getting python-decouple to work on AWS. #94

Closed theo39 closed 4 years ago

theo39 commented 4 years ago

not sure how to fix this problem: https://stackoverflow.com/questions/60733143/how-to-get-python-decouple-to-work-on-a-live-server

theo39 commented 4 years ago

python-decouple seems to work well when the project is run locally, but when pulled to my AWS Ubuntu server and ran, I get "decouple.UndefinedValueError: SECRET_KEY not found. Declare it as envvar or define a default value."

henriquebastos commented 4 years ago

The problem is that (1) you don't have your server environment variables set and (2) you don't have a .env to work as a fallback.

It seems you're not using the library correctly.

theo39 commented 4 years ago

I decided to use the AWS parameters instead. But thank you for your quick reply.