What would be the best way to loop through a list of addresses using geocoder.geocode
if there are some locations that don't exist on the map? How could I skip them so that the loop continues without this exception? Exception: Nominatim geocoder returned no results for query "Beli manastir planina,Bakar,Croatia"
Below is what I have tried.
L = [location1, location2, location3, ..., location n]
KO = []
for l in L:
KO = list(ox.geocoder.geocode(l))
if Exception:
continue
KO.append(KO)
Also I tried this:
try:
KO = []
for l in L:
KO = list(ox.geocoder.geocode(l))
KO.append(KO)
except Exception:
pass
Any help is appreciated.