Open dsagman opened 12 months ago
I'm not technically sure, but for me this seemed to be an issue derived from geopy.
The exactly same error message can be found in here.
I've solved (maybe?) it by changing line 55 of Giveme5W1H.extractor.extractors.environment_extractor.py
file as
self.geocoder = Nominatim(domain=host, timeout=8)
into
self.geocoder = Nominatim(domain=host, timeout=8, user_agent='MY_USER_AGENT')
where MY_USER_AGENT is a random string.
Describe the bug Error from Geopy: Using Nominatim with default or sample
user_agent
"geopy/2.4.1" is strongly discouraged, as it violates Nominatim's ToS https://operations.osmfoundation.org/policies/nominatim/ and may possibly cause 403 and 429 HTTP errors.Error seems to be coming from: /Giveme5W1H/extractor/extractors/environment_extractor.py line 55.
To Reproduce Fresh install on Mac OS, attempting to run sample code for a single text from the examples directory. Using a virtual env for installing python modules.
Expected behavior Get 5Ws from sample text.
Log ConfigurationError: Using Nominatim with default or sample
user_agent
"geopy/2.4.1" 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 customuser_agent
withNominatim(user_agent="my-application")
or by overriding the defaultuser_agent
:geopy.geocoders.options.default_user_agent = "my-application"
.Versions (please complete the following information):