Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: GeoPoint takes in optional precision parameter when it should be mandatory or have a default value #21

Open
leonh-ctds opened this issue Dec 30, 2024 · 0 comments

Comments

@leonh-ctds
Copy link

Precision parameter should actually be mandatory or have a default value specified as this results in an error if it is not specified. The GeoPoint constructor uses an encode function from geohash_tools which multiplies the precision by 5, resulting in an error as you cannot multiply a NoneType by an integer (by default, precision = None). I think there should be a more suitable default value (e.g. 2) or the parameter should not be considered optional.

Here is the error you get if you do not specify a precision parameter:
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant