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

raise KeyError(key) from None #1

Open
tinoargentino opened this issue Jul 2, 2019 · 2 comments
Open

raise KeyError(key) from None #1

tinoargentino opened this issue Jul 2, 2019 · 2 comments

Comments

@tinoargentino
Copy link

Hi!

I'm running into an error loading the .env

I get the following message:

Traceback (most recent call last):
File "mta_notification.py", line 10, in
api_key = os.environ['API_KEY']
File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/os.py", line 678, in getitem
raise KeyError(key) from None
KeyError: 'API_KEY'

Do you know what's the problem?

@tinoargentino
Copy link
Author

I think I solved it, I had to change the name of the file to only .env

@wblummer32
Copy link

There is a good explanation for this here

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