geopy.exc.ConfigurationError:
Using Nominatim with default or sample `user_agent` "geopy/2.2.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"`.
这个错误是因为这个 UA 默认值被用烂了,随便指定 user-agent 为一个 unique 的字符串就行,比如 BuyiXiao
初始化 Nominatim 时指定 user-agent
geolocator = Nominatim(user_agent='BuyiXiao')