When trying to do an assignment on the intro to Python GIS (https://automating-gis-processes.github.io/CSC18/lessons/L3/geocoding.html), Python errors. Geocoding addresses with Nominatim backend gives the error of violating Nominatim's ToS. I understand that it requires a user agent but everything I found fails.
import pandas as pd
import geopandas as gpd
from shapely.geometry import Point
fp = '/ownpath/addresses.txt/'
data = pd.read_csv(fp, sep = ';')
Now after entering the required code into the IPython console
from geopandas.tools import geocode
geo = geocode(data['addr'], provider = 'nominatim')
I get the error:
ConfigurationError: Using Nominatim with default or sample `user_agent` "geopy/2.0.0" 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"`.
Trying to change the user agent with these examples as it says in the error as well as ways for trying to fix the user agent do not work. I am new to GIS and do not know how to continue. Can anyone fix this problem?