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

Hello World Error #11

Closed
mooreed opened this issue Apr 2, 2015 · 1 comment
Closed

Hello World Error #11

mooreed opened this issue Apr 2, 2015 · 1 comment

Comments

@mooreed
Copy link

mooreed commented Apr 2, 2015

After performing a "pip install"

Open the python REPL and copy paste in the example in the README.md

import reverse_geocoder as rg
coords = (32.774185,-96.800618)
results = rg.search(coords)
Traceback (most recent call last):
File "", line 1, in
File "/Library/Python/2.7/site-packages/reverse_geocoder/init.py", line 194, in search
return rg.query(geodetic_in_ecef(geo_coords))
File "/Library/Python/2.7/site-packages/reverse_geocoder/init.py", line 174, in geodetic_in_ecef
lat = geo_coords[:,0]
IndexError: too many indices

@thampiman
Copy link
Owner

Hi Eric -- That is most certainly a bug. In the current version, the search function expects a list of coordinates. If you're only querying for a single coordinate, you can use the get function instead. Something like this...

coord = (32.774185,-96.800618)
result = rg.get(coord)

In the meantime, I'll fix the search function. Thanks!

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