0

I'm trying to set my address to None by geopy returns a value for latitude and longitude.

from geopy.geocoders import Nominatim
geolocator = Nominatim()
addr = None
location = geolocator.geocode(addr)
print location.latitude, location.longitude

Result

44.933143 7.540121
Cœur
  • 37,241
  • 25
  • 195
  • 267
user1050619
  • 19,822
  • 85
  • 237
  • 413
  • 1
    Why would you do that? The [docs](https://geopy.readthedocs.io/en/stable/#geopy.geocoders.Nominatim.geocode) explicitly say that the allowed types for the `query` param are dict or str. `None` is neither of that. – KostyaEsmukov Jul 21 '18 at 13:52
  • 1
    The `None` gets interpreted as string `"None"`, for which you're seeing the result. – KostyaEsmukov Jul 21 '18 at 13:54

0 Answers0