Closed rth closed 4 years ago
Or rather that the downloaded data looks fine, the issue is with how it is parsed and stored to csv in https://github.com/symerio/pgeocode/blob/ff6b7e9cecd4c9953f77d615732412ec99e1608a/pgeocode.py#L81
Actually the version on master was fine. https://download.geonames.org/export/dump/
is a another URL for data that doesn't work contain postal codes. https://download.geonames.org/export/zip/
is the correct URL.
Simplified download mechanism a bit in https://github.com/symerio/pgeocode/commit/b42b3f25f10086bf19ff5ba79b22554f419cb1b0 . Closing.
Recently the new download location changed to
"https://download.geonames.org/export/dump/{country}.zip"
simply changing the URL doesn't work, as the downloaded file looks incorrect then in~/pgeocode_data/
Downloading the file manually or with
wget
does download the right data.I'm not sure what is going on, either the server serves cached data based on the user agent or there is some incorrect caching happening on the client side.
In any case this is a blocker for pgeocode.