-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
download_metadata fails to download #404
Comments
Hi @louis-h-p I'm not 100% sure what's going here but it seems to be due to a change in the file format and specifically how the '#' is being used for comments. Using a totally unrelated CSV tool I'm able to reproduce this error, which makes me more confident the issue isn't in our codebase: curl -s http://download.geonames.org/export/dump/countryInfo.txt | sed '/^#/d' | xsv cat rows
AD AND 020 AN Andorra Andorra la Vella 468 77006 EU .ad EUR Euro 376 AD### ^(?:AD)*(\d{3})$ ca 3041565 ES,FR
CSV error: record 1 (line: 1, byte: 110): found record with 6 fields, but the previous record has 2 fields That said, we can hopefully work around it, I will open a PR which implements my own handling of CSV comments which seems to work fine, I'm still not completely clear on why mine works and these other ones don't 🤔 |
The Geonames servers are pretty notorious for changing file formats or hosting broken files for quite some time. Usually they change it back after a while. But I checked and found the same thing as @missinglink. It looks like the |
Thanks for the bug report @louis-h-p, this issue seems to be due to the geonames files changing to include a CSV comment header prefixed with Since it's a non-standard format things broke, but we're handling it in our codebase now so please try again. |
Thanks @missinglink & @orangejulius . That works now. |
I'm trying to install geonames. I've done this dozens of times in the past but I can't get it to download any data now. I've tried using the geonames docker image, an AWS instance and my a local vagrant image.
During the postinstall steps (npm run download_metadata) nothing is downloaded, it throws the error below immediately. Note I can download the entire AU.zip (or others) from geonames without issue.
Another question - Is it possible to use geonames to import from a local file? or do I have to rely on download_metadata etc?
The text was updated successfully, but these errors were encountered: