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

list index out of range #10

Open
morenoh149 opened this issue Oct 18, 2018 · 2 comments
Open

list index out of range #10

morenoh149 opened this issue Oct 18, 2018 · 2 comments

Comments

@morenoh149
Copy link

I get this error on kaggle

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-15-f1891c8d087c> in <module>
----> 1 tz = whenareyou('Madrid')
      2 tz

/opt/conda/lib/python3.6/site-packages/whenareyou/__init__.py in whenareyou(address)
     50     latlong = cached_json_get(
     51         LONG_LAT_URL.format(quote_plus(address))
---> 52     )['results'][0]['geometry']['location']
     53 
     54     return get_tz(latlong['lat'], latlong['lng'])

IndexError: list index out of range
@fili
Copy link

fili commented Jun 14, 2019

Same here:

>>> tz = whenareyou('Hamburg')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/whenareyou/__init__.py", line 52, in whenareyou
    )['results'][0]['geometry']['location']
IndexError: list index out of range

@sils
Copy link
Contributor

sils commented Jun 19, 2020

I think the google API needs authentication by now which this library does not support. See also #6 however as of today that's not ready to be merged but may help you.

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

3 participants