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

Problem setting API key #175

Open
mattfriend opened this issue Dec 17, 2020 · 0 comments
Open

Problem setting API key #175

mattfriend opened this issue Dec 17, 2020 · 0 comments

Comments

@mattfriend
Copy link

mattfriend commented Dec 17, 2020

Hi there.
Firstly, thanks so much for creating this API wrapper - it's really useful.
I created a project using it about 2 years ago, and it worked beautifully.
However I'm now trying to make some amendments to that project, and I'm struggling to set my API key.
My project is a flask powered web app, so before launching the app I set an environmental variable:
METOFFICE_API_KEY=NNNNNNN-XXXX-YYYY-ZZZZ-AAAABBBBCCCC
I then have the following code to create a connection, per your examples:
metOfficeApiKey = os.environ.get("METOFFICE_API_KEY")
connection = datapoint.connection(api_key=metOfficeApiKey)

I'm getting the following error:
ValueError: Profile not found in /Users/Matt/Library/Application Support/DataPoint/default.key. Please install your API key with datapoint.profile.install_API_key("<YOUR-KEY>")

I'm still pretty new in web development so I'm not sure why I'm getting this error - could be because I've messed up my python environment? I'd hugely appreciate any thought you have on how to address this. Thanks so much in advance!

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

1 participant