webmap.py:5: DeprecationWarning: Using Nominatim with the default "geopy/1.22.0" `user_agent` is strongly discouraged, as it violates Nominatim's ToS
https://operations.osmfoundation.org/policies/nominatim/ and may possibly cause 403 and 429 HTTP errors.
Please specify a custom `user_agent` with `Nominatim(user_agent="my-application")` or by overriding the default `user_agent`:
`geopy.geocoders.options.default_user_agent = "my-application"`.
In geopy 2.0 this will become an exception.
nom=Nominatim()
The above warning is shown when I run it in my notepad compiled with command prompt, but when I use Jupiter notebook the warning is been shown but continues further and displays the result. Here is my code:
from geopy.geocoders import Nominatim
def map_coordinates():
address = str(input("enter the street name and city seperated by :"))
nom = Nominatim()
c = nom.geocode(address)
return (c.latitude, c.longitude)
z, x = map_coordinates()
I am using the above code to convert the string (address) into co-ordinates. Please help me solve the above warning or please let me know if any other method is available to do the same process.