diff --git a/flaskr/geocoder.py b/flaskr/geocoder.py index c798a3d..db41448 100644 --- a/flaskr/geocoder.py +++ b/flaskr/geocoder.py @@ -1,10 +1,16 @@ import shelve +import ssl import time +import certifi import geopy +import geopy.geocoders from flaskr.core import get_path +ctx = ssl.create_default_context(cafile=certifi.where()) +geopy.geocoders.options.default_ssl_context = ctx + class CachedGeocoder: diff --git a/requirements.txt b/requirements.txt index c0e75ff..ca2fbcf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -24,6 +24,7 @@ Markdown==3.1.1 numpy==1.18.5 enum34==1.1.6 geopy==1.20.0 +certifi==2019.11.28 python-dotenv==0.10.3 # Force stable werkzeug -- libgit2 0.21.2