Dierme/latent-gan

zipfile.BadZipFile: File is not a zip file

skoc opened this issue · 2 comments

skoc commented

Hi,

getting "zipfile.BadZipFile: File is not a zip file" error. Did you experience that before?

Thanks

python run.py -sf data/EGFR_training.smi
WARNING: Logging before flag parsing goes to stderr.
W0925 15:35:04.341398 140125214783296 deprecation_wrapper.py:118] From /home/ubuntu/anaconda3/envs/latent-gan/lib/python3.6/site-packages/ddc_pub-0.3-py3.6.egg/ddc_pub/ddc_v3.py:25: The name tf.keras.layers.CuDNNLSTM is deprecated. Please use tf.compat.v1.keras.layers.CuDNNLSTM instead.

Initializing model in test mode.
Loading model.
Traceback (most recent call last):
File "run.py", line 2, in
from encode import encode
File "/home/ubuntu/omic/latent-gan/encode.py", line 4, in
from autoencoder import autoencoder
File "/home/ubuntu/omic/latent-gan/autoencoder/autoencoder.py", line 22, in
model = load_model()
File "/home/ubuntu/omic/latent-gan/autoencoder/autoencoder.py", line 18, in load_model
model = ddc.DDC(model_name=path)
File "/home/ubuntu/anaconda3/envs/latent-gan/lib/python3.6/site-packages/ddc_pub-0.3-py3.6.egg/ddc_pub/ddc_v3.py", line 238, in init
self.__load(self.model_name)
File "/home/ubuntu/anaconda3/envs/latent-gan/lib/python3.6/site-packages/ddc_pub-0.3-py3.6.egg/ddc_pub/ddc_v3.py", line 820, in __load
with zipfile.ZipFile(model_name + ".zip", "r") as zip_ref:
File "/home/ubuntu/anaconda3/envs/latent-gan/lib/python3.6/zipfile.py", line 1131, in init
self._RealGetContents()
File "/home/ubuntu/anaconda3/envs/latent-gan/lib/python3.6/zipfile.py", line 1198, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

Hey, I figured that if you go all the way to the zip file and click on it, then there is a download button on the right side (above the window where the file usually shows up), which you can click and download a true zip file that works (at least in my case). For example here: https://github.com/Dierme/latent-gan/blob/master/autoencoder/chembl_pretrained.zip.

Hi,
Sorry for not getting back to you before now.
The reason why the file is not a .zip file is that it is stored on git via git-lfs, as it is rather large for a single file. We have updated the README to properly reflect a way to get all files needed smoothly.

Good thing that you found it by yourself!

Best,
Simon