Hi,

this seems to be caused by a rounding error - I'm not exactly sure which 
part is to blame, but this line 
<https://github.com/google/open-location-code/blob/cafb35c0d74dd0c06b6a75c05f89e32a972b7b23/python/openlocationcode_test.py#L138>
 
defines a precision of 10 for all values to be tested, while this test case 
<https://github.com/google/open-location-code/blob/cafb35c0d74dd0c06b6a75c05f89e32a972b7b23/test_data/decoding.csv#L10>
 
has values all over the place, ranging from six to eleven digits after the 
decimal point.

If you are just trying to use plus codes, it is probably safe to just 
remove that ultra-exact test case for the time being. If you want to 
contribute code, it might be worth checking out why this test fails for you 
but apparently not on GitHub - I'm not a Python expert, so can't really 
help with that part. :)


On Friday, February 18, 2022 at 1:21:23 PM UTC+1 ruan9...@gmail.com wrote:

> Good day everyone.
>
> Could anyone please help me resolve the following exception?
>
> When I run the *openlocationcode_test.py *script, I get the following 
> Exception:
>
> Exception has occurred: AssertionError (note: full exception trace is 
> shown but execution is paused at: test_decoding)
> 2.7822363281 <(782)%20236-3281> != 2.782236328 : {'code': 
> '7FG49QCJ+2VXGJ', 'length': 13.0, 'latLo': 20.370113, 'lngLo': 2.782234375, 
> 'latHi': 20.370114, 'longHi': 2.782236328}
>
> This is my first time using Open-Location-Code, and I do not know how to 
> resolve this (ps. I have been sitting with this exception for the past 2 
> Hours, and have tried everything I can think of).
>

-- 
Public site: http://www.openlocationcode.com/
Github project: https://github.com/google/open-location-code
Demo site: http://plus.codes/
--- 
You received this message because you are subscribed to the Google Groups "Plus 
Codes Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to open-location-code+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/open-location-code/26a6e921-8f2b-4f80-8e36-016069b8e15cn%40googlegroups.com.

Reply via email to