excuse me, anyone understand what I should do to the code? The code is error : BadZipFile: File is not a zip file. But the file in the link i use is already in a zip file.
**The code is : **
import tensorflow as tf
!wget --no-check-certificate \
https://drive.google.com/file/d/1zBasc3iGhJwCoCvZngcySO-Zxv1Mle59/view?usp=sharing \
-O /tmp/rockpaperscissors.zip
import zipfile,os
local_zip = '/tmp/rockpaperscissors.zip'
zip_ref = zipfile.ZipFile(local_zip, 'r')
zip_ref.extractall('/tmp')
zip_ref.close()
base_dir = '/tmp/image'
train_dir = os.path.join(base_dir, 'train')
validation_dir = os.path.join(base_dir, 'val')
**The error is : **
BadZipFile Traceback (most recent call last)
<ipython-input-7-155df6c2cd43> in <module>
2 import zipfile,os
3 local_zip = '/tmp/rockpaperscissors.zip'
----> 4 zip_ref = zipfile.ZipFile(local_zip, 'r')
5 zip_ref.extractall('/tmp')
6 zip_ref.close()
1 frames
/usr/lib/python3.7/zipfile.py in _RealGetContents(self)
1323 raise BadZipFile("File is not a zip file")
1324 if not endrec:
-> 1325 raise BadZipFile("File is not a zip file")
1326 if self.debug > 1:
1327 print(endrec)
BadZipFile: File is not a zip file
And the proof that my file is already in a zip file is : (look at the picture that i inserted
excuse me, anyone understand what I should do to the code? The code is error : BadZipFile: File is not a zip file. But the file in the link i use is already in a zip file. I'm trying to create an Artificial Neural Network for image detection by inserting a folder containing pictures of rock, scissors, and paper hand poses. Thank you very much