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

Uninformative error is raised when passing tuple of integers into rg.get #49

Open
allenlawrence94 opened this issue Jul 17, 2019 · 0 comments

Comments

@allenlawrence94
Copy link

When using rg.get like so:

import reverse_geocoder as rg
rg.get((40, -80.5))

the following error is raised:

TypeError: Expecting a tuple

You can see here that this error is raised because the first element of geo_coord is not a float. This is very confusing behavior (especially considering rg.get((40.5, -80)) works perfectly fine) and the error message is not helpful.

I think this function should be able to handle all real numerical types (or at least float and int), and the error message should be improved.

I'll submit a PR for this soon unless anyone has any reasoning against this.

allenlawrence94 added a commit to allenlawrence94/reverse-geocoder that referenced this issue Jul 17, 2019
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