Skip to content
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

Better error message on unzip failure #675

Open
texasmichelle opened this issue Oct 1, 2020 · 2 comments
Open

Better error message on unzip failure #675

texasmichelle opened this issue Oct 1, 2020 · 2 comments
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@texasmichelle
Copy link
Member

texasmichelle commented Oct 1, 2020

I attempted to run benchmarks on a fresh instance that did not have unzip installed. The error message is misleading, stating that the file does not exist, even though the download was successful.

We should also document unzip in the README as a required dependency, or fail more gracefully. Even better, do the unarchiving ourselves, without relying on a local install (@BradLarson).

$ swift run -c release Benchmarks   --filter WordSegScore   --filter-not x10
running WordSegScore: sentence_4...Loading resource: seg
File does not exist locally at expected path: /home/michellecasbon_google_com/.cache/swift-models/datasets/WordSeg/seg and must be fetched
Fetching URL: https://s3.eu-west-2.amazonaws.com/k-kawakami/seg.zip...
Archive saved to: /home/michellecasbon_google_com/.cache/swift-models/datasets/WordSeg
Failed to extract /home/michellecasbon_google_com/.cache/swift-models/datasets/WordSeg/seg.zip with error: Error Domain=NSCocoaErrorDomain Code=260 "The file doesn’t exist."
$ ls -l /home/michellecasbon_google_com/.cache/swift-models/datasets/WordSeg/seg.zip
-rw-r--r-- 1 michellecasbon_google_com 803248955 7375585 Oct  1 02:38 /home/michellecasbon_google_com/.cache/swift-models/datasets/WordSeg/seg.zip
@texasmichelle texasmichelle added help wanted Extra attention is needed good first issue Good for newcomers labels Oct 1, 2020
@abhichou4
Copy link

I'd like to work on this issue. I could start with getting the right error message and adding unzip as a required dependency in the README.

@abhichou4
Copy link

abhichou4 commented Dec 27, 2020

The problem seems to be in DatasetUtilities.swift. In extractArchive, the "The file doesn’t exist." is the unzip executable that does not exist. (here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants