Reputation: 109
!unzip '/content/Flowers-Dataset (1).zip'
I tried unzipping using python command !unzip in google colab. I tried re-downloading the zip file and uploading but the error is still same as below,
Archive: /content/Flowers-Dataset (1).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 /content/Flowers-Dataset (1).zip or
/content/Flowers-Dataset (1).zip.zip, and cannot find /content/Flowers-Dataset (1).zip.ZIP, period.
Upvotes: 10
Views: 53153
Reputation: 21
Make sure that your file is uploaded successfully before running the command.
You can use this command to unzip the file on collab:
unzip dataset_location -d dataset_extract_location
Upvotes: 2
Reputation: 3705
Is /content/Flowers-Dataset (1).zip
available publicly? If so, can you post a link? That will make it much easier to fault find the issue.
Also, how did you do the download?
The message End-of-central-directory signature not found
means one of the following:
If you have access to a linux/Mac (or access to WSL on Windows), run file /content/Flowers-Dataset (1).zip'
. If it is a zip file, you should get something like this
$ file test.zip
test.zip: Zip archive data, at least v1.0 to extract, compression method=store
If the file
command doesn't say it is a zip file, can you post the output?
Try running unzip -FF '/content/Flowers-Dataset (1).zip'
. That will attempt to extract the files that are recoverable. If that does recover files, the question then is why the zip file has been corrupted. To understand that we need to either get access to the zip file or know more about how you downloaded it.
Upvotes: 7