Skip to content
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

dotenv_values vs load_dotenv oddity #430

Open
algaspar opened this issue Oct 11, 2022 · 1 comment
Open

dotenv_values vs load_dotenv oddity #430

algaspar opened this issue Oct 11, 2022 · 1 comment

Comments

@algaspar
Copy link

I set up a Django settings.py file to load RSA keys from a file into a dict with dotenv_values():

key_config = dotenv_values("path/to/file")

my_key = key_config['my_key']
my_key_id = key_config['my_key_id']

It worked fine in my original testing, but the next day it stopped working. I changed to using load_dotenv("path/to/file") and just having 'my_key' and 'my_key_id' as environment variables. That worked fine (and continues to work). I could not find any code changes and the file with my RSA keys remained the same in both instances.

Is there something that might have caused this behavior, or am I (likely) not seeing a change/typo in my code?

Thanks--

Al

@bbc2
Copy link
Collaborator

bbc2 commented Nov 12, 2022

I'm not aware of any change in our code that could have caused this. If you have more information about your environment, test file and the version of python-dotenv being used, that would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants