Helsinki-NLP / Opus-MT

Open neural machine translation models and web services
MIT License
592 stars 71 forks source link

Unzipping model.zip fails #8

Closed jjlatval closed 4 years ago

jjlatval commented 4 years ago

It looks like there is an issue with model.zip downloaded from pouta.csc.fi. This is a recent issue, as this worked fine yesterday:

joni@Joker:~/Opus-MT$ sudo make all
wget -O model-list.txt https://object.pouta.csc.fi/OPUS-MT-models
--2020-01-09 12:36:12--  https://object.pouta.csc.fi/OPUS-MT-models
Resolving object.pouta.csc.fi (object.pouta.csc.fi)... 86.50.254.19, 86.50.254.18
Connecting to object.pouta.csc.fi (object.pouta.csc.fi)|86.50.254.19|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/xml]
Saving to: ‘model-list.txt’

model-list.txt                          [ <=>                                                              ] 334,09K  --.-KB/s    in 0,08s   

2020-01-09 12:36:12 (4,18 MB/s) - ‘model-list.txt’ saved [342108]

wget -O model.zip \
    https://object.pouta.csc.fi/OPUS-MT-models/`tr "<>" "\n\n" < model-list.txt | \
    grep 'fi-en/opus' |\
    sort | tail -1`
--2020-01-09 12:36:12--  https://object.pouta.csc.fi/OPUS-MT-models/
Resolving object.pouta.csc.fi (object.pouta.csc.fi)... 86.50.254.19, 86.50.254.18
Connecting to object.pouta.csc.fi (object.pouta.csc.fi)|86.50.254.19|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/xml]
Saving to: ‘model.zip’

model.zip                               [ <=>                                                              ] 334,09K  --.-KB/s    in 0,09s   

2020-01-09 12:36:12 (3,56 MB/s) - ‘model.zip’ saved [342108]

mkdir -p model
cd model && unzip ../model.zip
Archive:  ../model.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of ../model.zip or
        ../model.zip.zip, and cannot find ../model.zip.ZIP, period.
Makefile:163: recipe for target '/usr/local/share/opusMT/models/fi-en/opus.npz' failed
make: *** [/usr/local/share/opusMT/models/fi-en/opus.npz] Error 9
jjlatval commented 4 years ago

OK, the reason seems to be that the default fi-en is not present in model-list.txt

jorgtied commented 4 years ago

The issue should be fixed now. Please, update your copy and try again.

jjlatval commented 4 years ago

Yes, this works now. Thanks!