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

Python: dict_decode throws error when 3rd dimension = 'absent','reserved1','reserved2' #62

Open
RenoFilla opened this issue Nov 23, 2022 · 0 comments

Comments

@RenoFilla
Copy link
Contributor

RenoFilla commented Nov 23, 2022

None of the following works running in dict_decode:

'BGgwjuyDg8wzcgkh9Bgkh9Bgkh9Bgkh9B' (absent)
'BmGgwjuyDg8wzc8Bgkh9Bgkh9BTgkh9Bgkh9BgF' (reserved1)
'B2GgwjuyDg8wzc8Bgkh9Bgkh9BTgkh9Bgkh9BgF' (reserved2)


KeyError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_27848\2616460968.py in
----> 1 fp.dict_decode(p)

C:\Tools\Programming\Anaconda3\lib\site-packages\flexpolyline_init_.py in dict_decode(encoded)
42 """Return an list of coordinates dicts. The dict contains always the keys 'lat', 'lng' and
43 depending on the polyline can contain a third key ('elv', 'lvl' or 'alt')."""
---> 44 return list(iter_dict_decode(encoded))

C:\Tools\Programming\Anaconda3\lib\site-packages\flexpolyline_init_.py in iter_dict_decode(encoded)
30 """Return an iterator over coordinates dicts. The dict contains always the keys 'lat', 'lng' and
31 depending on the polyline can contain a third key ('elv', 'lvl', 'alt', ...)."""
---> 32 third_dim_key = THIRD_DIM_MAP[get_third_dimension(encoded)]
33 for row in iter_decode(encoded):
34 yield {

KeyError: 0

@RenoFilla RenoFilla changed the title dict_decode throws error when 3rd dimension absent Python: dict_decode throws error when 3rd dimension absent Nov 23, 2022
@RenoFilla RenoFilla changed the title Python: dict_decode throws error when 3rd dimension absent Python: dict_decode throws error when 3rd dimension = 'absent','reserved1','reserved2' Nov 23, 2022
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