Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Google client keys don't get picked up

See original GitHub issue

We noticed that after upgrading geocoder from 1.25.0 to later versions, the Google environment variables when using a client account do not get picked up, here is the error:

<ipython-input-3-4e48b1d75176> in <module>()
----> 1

.../geocoder/ in google(location, **kwargs)
    193         > elevation
    194     """
--> 195     return get(location, provider='google', **kwargs)

.../geocoder/ in get(location, **kwargs)
    159         if method not in options[provider]:
    160             raise ValueError("Invalid method")
--> 161     return options[provider][method](location, **kwargs)

.../geocoder/ in __init__(self, location, **kwargs)
    707         # check validity of provider key
--> 708         provider_key = self._get_api_key(kwargs.pop('key', None))
    710         # point to geocode, as a string or coordinates

.../geocoder/ in _get_api_key(cls, key)
    685         # raise exception if not valid key found
    686         if not key:
--> 687             raise ValueError('Provide API Key')
    689         return key

ValueError: Provide API Key

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

avandermcommented, Aug 23, 2017

It searches for an API key in MultipleResultsQuery in, thus throwing an error if only a client + secret is passed.

DenisCarrierecommented, Aug 23, 2017

Perfect! 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use API Keys | Maps JavaScript API - Google Developers
The API key is a unique identifier that authenticates requests associated with your project for usage and billing purposes. You must have at...
Read more >
Setting up API keys - API Console Help - Google Support
On the left, choose Credentials. Click Create credentials and then select API key. Note: In addition to reading the instructions on this page,...
Read more >
Best practices for managing service account keys - IAM
Keeping service account keys separate from the program binaries helps ensure that a user who can access the binary does not implicitly get...
Read more >
How to setup a Google Maps API Key - Studio Simpatico
Before we can set up a project, and get the needed API key, we first need ... which covers most clients and doesn't...
Read more >
How does Google Maps secure their API Key? How to make ...
I could secure it with just a random token but of course this could be easily spoofed by anyone looking at the code...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found