KeyError occurs in In [3] with "Apartment search with ORS"

Hi. I have been trying to run the “Apartment search with Openrouteservice” (apartment search with openrouteservice | Openrouteservice) in exactly the same way before I conduct my own project but I encounter a KeyError in In [3] as in an attached, although I have copied and pasted the entire codes from the web page. The In [2] works perfectly and I see the same maps as in the website.

Could someone help me to figure out what I have done wrong.

could you squeeze in a:

poi_response = clnt.places(**params_poi)
print(json.dumps(poi_response))

after line 18
and check the output?

1 Like

Hey,

this is related to this issue in the openpoiservice that was recently fixed.

The solution here is to just drop the [0] in row 19.
It’ll be fixed on github soon.
EDIT: It was just now fixed on github.

Best regards

1 Like

Thank you so much for your prompt responses! It has been fixed!

1 Like

Yes, it has been fixed by removing the [0] in row 19!! Thank you so much!

1 Like