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

zipfile.BadZipFile: File is not a zip file #36

Open
zhimawa opened this issue Jan 2, 2020 · 2 comments
Open

zipfile.BadZipFile: File is not a zip file #36

zhimawa opened this issue Jan 2, 2020 · 2 comments

Comments

@zhimawa
Copy link

zhimawa commented Jan 2, 2020

File "/home/li.ye/anaconda3/lib/python3.6/site-packages/mmdet-0.6rc0+unknown-py3.6.egg/mmdet/datasets/zip_dataset.py", line 305, in prepare_test_img img = load_img(img_info['filename'], self.img_prefix) File "/home/li.ye/anaconda3/lib/python3.6/site-packages/mmdet-0.6rc0+unknown-py3.6.egg/mmdet/datasets/zip_dataset.py", line 56, in load_img with zipfile.ZipFile(zipfilename, 'r') as f: File "/home/li.ye/anaconda3/lib/python3.6/zipfile.py", line 1108, in __init__ self._RealGetContents() File "/home/li.ye/anaconda3/lib/python3.6/zipfile.py", line 1175, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file
When I tried to use pretrained model to test, I met ZIP ERROR, but I made the COCOZIP dataset well, how can I fix it? Thanks!
@leoxiaobin @sunke123 @bearcatt

@wondervictor
Copy link
Member

  1. check your path
  2. use CocoDataset instead which zip is not necessary.

@zhimawa
Copy link
Author

zhimawa commented Jan 3, 2020

check your path
use CocoDataset instead which zip is not necessary.

Thanks so much for your reply! I will retry and hope it can work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants