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
Google requires API Key #428
Comments
Yes, just pass it as the 'key' kwarg. And it applies to all Google's methods in this geocoder. In the example below, I put my key in an environment variable and retrieve via os module:
|
For some reason I can't get geocoder to work. Here's what I tried:
key_google = os.environ['MY_GOOGLE_KEY']
|
@rgraulus It looks like you don't have the |
When I type echo $MY_GOOGLE_KEY in the command line it prints out my Google Maps API key. So, the variable is set. However, this did not resolve the issue. Also, I checked my Google credentials and I do have a Google Maps Geocoding API key. I also tried a few other commands e.g.:
I always get the output None. |
Also, I tested my API key by adding it to the following request and it works: |
Based on the trace back you shared (below), it looks like the python process that ran your code does not have access to the
Can you try running your code again from the same shell where you confirmed that the environment variable is set? Regarding the |
Great, it now works! Two more questions:
Thanks! |
I haven't used this project for a while, so I can't comment on your first point. My guess is that you can't, but you can review the documentation and or source code for the Google api portion of the project to confirm. Regarding your second question, you can definitely write the output (and whatever else you want) to a CSV. Checkout Python's built in csv module: https://docs.python.org/3/library/csv.html |
Thanks! |
- perhaps, it's nice to add the info on README. - DenisCarriere#419, DenisCarriere#428
Hi, I have the same issue pop up again! Since I get the same I added the directory of the conda env where geocoder is installed to the .bashrc file: But this does not solve the problem. What am I doing wrong? Regards Rik |
Does your code supports Google's reverse geocoding since they require the use of an API key? I quickly browsed through your documentation but couldn't find anything on how to use Google API key. Please advise.
The text was updated successfully, but these errors were encountered: