Geopy location error (in python) -


i have list of coordinates, use geopy geolocator's function related country. @ lines following error:

keyerror: 'country'

my programline this:

cim = location.raw['address']['country'] 

it returns country related coordinates. , error isn't in coordinates, because if cut line file, error same @ same line. in addition function works out of loop right.

it's saying there's no 'country' key whichever address you're providing.

are coordinates in countries, or can in sea/ocean? can coordinates on border of 2 (or more) countries?

if 'yes' of these questions, check how geopy handles these exceptions. it's possible throws error (which happening in case).


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -