-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with Environment Variables on AWS Elastic Beanstalk #162
Comments
check this pull request I have encountred the same issue, and I found that it retrieves the values from the os.environ first before checking the repository file so that when you update your variables it does not updated in the os.environ |
Thanks @hazemAzzam, I hope it gets merged. |
Does this problem still exist? The Problem of @hazemAzzam was with .env files. As i understand this Issue; you're not using .env files?? The It checks the os.environ by using its When you say you worked around this by using os.environ.get(key); which should only differ from os.environ[key] by not raising KeyError if When you switched to os.environ.get(...) are you by any chance supplying a default (2nd param) aswell? |
The PR was closed, so I am closing this issue too since we can't reproduce it. |
Apologies for any inconvenience caused, I found out that I activated the wrong virtual Environment. Once I activated the correct one |
When deploying a Django application on AWS Elastic Beanstalk, I encountered a problem with
python-decouple
. It seems unable to fetch environment variables set in the Elastic Beanstalk environment, even though they are available on the instance.Steps to reproduce:
python-decouple
to fetch environment variables.Expected Result:
python-decouple
should fetch the environment variables correctly.Actual Result:
python-decouple
throws anUndefinedValueError
indicating that it can't find the environment variable.Workaround:
Switching to
os.environ.get()
works, indicating the issue is withpython-decouple
and not the environment setup.Environment:
python-decouple
version: 3.8The text was updated successfully, but these errors were encountered: