Im trying to find city name with geocoder lib. I have float coordinates (lat and lng), I thing I did everything good (I have looked into their documentations) but I always get an error:
ValueError: Location should be a string
Error is in this line:
city_name = geocoder.google([lat, lng], mothod = 'reverse')
This is the code:
import geocoder
lat = 44.0207472303
lng = 20.9033038427
print(lat, lng)
city_name = geocoder.google([lat, lng], mothod = 'reverse')
city_name = str(city_name.city)
print(city_name)
method='reverse'notmothodin linecity_name = geocoder.google([lat, lng], mothod = 'reverse')Noneas result