Closed long5270 closed 5 years ago
Seems this download URL change is not in versions 0.2.0 and 0.2.1 as I'm getting 404s for https://download.geonames.org/export/zip/AD.zip when using these versions, but https://www.geonames.org/export/zip/AD.zip works.
Old url response 404
>>> pgeocode.Nominatim('BE') Traceback (most recent call last): File "<input>", line 1, in <module> File "/Users/shenwenlong/.virtualenvs/usdt/lib/python3.6/site-packages/pgeocode.py", line 55, in __init__ self._data_path, self._data = self._get_data(country) File "/Users/shenwenlong/.virtualenvs/usdt/lib/python3.6/site-packages/pgeocode.py", line 71, in _get_data reader, encoding, compression = get_filepath_or_buffer(url)[:3] File "/Users/shenwenlong/.virtualenvs/usdt/lib/python3.6/site-packages/pandas/io/common.py", line 194, in get_filepath_or_buffer req = urlopen(filepath_or_buffer) File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 570, in error return self._call_chain(*args) File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(*args) File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found