You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason why the first example works is because the leading + is not getting matched by the regexp. But the second example fails, because the second plus doesn't allow for the regex to match.
That format (with pluses) is not currently supported, so this is a new feature request rather than a bug.
A PR with that fix along with new tests and examples in docs would be welcome.
For the time being you can workaround this problem by simply stripping off all pluses from the input:
In [2]: geopy.point.Point('+037.33270,-122.00530'.replace('+', ''))
Out[2]: Point(37.3327, -122.0053, 0.0)
In [3]: geopy.point.Point('+041.69438,+001.51461'.replace('+', ''))
Out[3]: Point(41.69438, 1.51461, 0.0)
This example works:
geopy.point.Point('+037.33270,-122.00530')
This example does not work:
geopy.point.Point('+041.69438,+001.51461')
ValueError: Failed to create Point instance from string: unknown format.
The string in example that is not working is indeed valid GPS, so I believe that this is a bug.
The text was updated successfully, but these errors were encountered: