-
-
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
Error: invalid signature
when unzipping Geonames data file
#26
Comments
Since this ticket we've completely revamped the Geonames importer. This looks like a transient issue related to an invalid download file. If it happens again I will take another look. |
Hello two years later, this issue has happened again and is an issue in the unzip utility we use. Fortunately there is a replacement |
This appears to not necessarily be an issue with the unzip NPM package, but something about the files that are downloaded to disk that causes them to be slightly corrupt in a way the |
The downloader is now similar to the WOF downloader in that it uses child_process.exec and curl to download data. This seems to be more reliable than using request and piping to a file. There were also issues with the progress bar package, so rather than sort them out, this allows us to simply remove them. This change probably will help fix #26, but it's not 100% certain.
This issue is still occuring in our builds, despite the attempts in #154 and #171 to solve or work around it. This has been happening periodically since the very creation of this repository (it is in fact a dupe of the very first issue in the repo). We need to consider using an alternate unzip method, such as a commandline unzip that is more robust, or some sort of other solution. |
Error: invalid signature
when unzipping Geonames data file
Does anyone know if there a work-around for this? I'm encountering this issue currently, and I'm unable to complete the import. |
Hey @asdfasdafas, One possible alternative workaround would be to change our code to avoid using the node.js zip library, and use a standard commandline unzip. This would require some reorganizing of the code in this importer, but if you were interested in taking a look at it I'd be happy to help point you in the right direction. We would gladly accept a PR that does that :) |
Ah I probably wouldn't be much help on the node.js code, but would you happen to know where I could download copies of the known-good geonames files? |
No worries. This is the one we have cached for Mapzen Search: https://s3.amazonaws.com/pelias-data/geonames/allCountries.zip Its modification time is |
An update here: as it turns out, there is no correct way to stream a We have two options, switch to using a library like yazul which implements a non-streaming API for reading zip files, or extract zip files after download to expose the underlying text file, which IS stream-able. My vote is for the second approach, since it would have the added benefit of removing code, whereas adjusting our existing code to use yazul may be a bit of tedious work. In either case, #297 is effectively a prerequisite. |
Update: a possible workaround here is to download the broken Geonames zip file, extract the data with |
This occurs sporadically.
The text was updated successfully, but these errors were encountered: