daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Oct 16th, 2018 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ------------------------------------------------------------------------
  2. zip-test.py:
  3.  
  4. import zipfile
  5. zf = zipfile.ZipFile('django-compressor-1.1.2.pybundle', 'r')
  6. zf.debug=3
  7.  
  8. ------------------------------------------------------------------------
  9. $ python zip-test.py
  10.  
  11. Traceback (most recent call last):
  12.   File "zip-test.py", line 3, in <module>
  13.     zf = zipfile.ZipFile('django-compressor-1.1.2.pybundle', 'r')
  14.   File "/usr/local/python/lib/python2.6/zipfile.py", line 696, in __init__
  15.     self._GetContents()
  16.   File "/usr/local/python/lib/python2.6/zipfile.py", line 716, in _GetContents
  17.     self._RealGetContents()
  18.   File "/usr/local/python/lib/python2.6/zipfile.py", line 728, in _RealGetContents
  19.     raise BadZipfile, "File is not a zip file"
  20. zipfile.BadZipfile: File is not a zip file
  21.  
  22. ------------------------------------------------------------------------
  23. $ pip install django-compressor-1.1.2.pybundle
  24. Unpacking ./django-compressor-1.1.2.pybundle
  25. Exception:
  26. Traceback (most recent call last):
  27.   File "/var/www/sites/virtualenvs_python/venv/lib/python2.6/site-packages/pip/basecommand.py", line 104, in main
  28.     status = self.run(options, args)
  29.   File "/var/www/sites/virtualenvs_python/venv/lib/python2.6/site-packages/pip/commands/install.py", line 245, in run
  30.     requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  31.   File "/var/www/sites/virtualenvs_python/venv/lib/python2.6/site-packages/pip/req.py", line 985, in prepare_files
  32.     self.unpack_url(url, location, self.is_download)
  33.   File "/var/www/sites/virtualenvs_python/venv/lib/python2.6/site-packages/pip/req.py", line 1105, in unpack_url
  34.     return unpack_file_url(link, loc)
  35.   File "/var/www/sites/virtualenvs_python/venv/lib/python2.6/site-packages/pip/download.py", line 306, in unpack_file_url
  36.     unpack_file(source, location, content_type, link)
  37.   File "/var/www/sites/virtualenvs_python/venv/lib/python2.6/site-packages/pip/util.py", line 490, in unpack_file
  38.     unzip_file(filename, location, flatten=not filename.endswith('.pybundle'))
  39.   File "/var/www/sites/virtualenvs_python/venv/lib/python2.6/site-packages/pip/util.py", line 380, in unzip_file
  40.     zip = zipfile.ZipFile(zipfp)
  41.   File "/usr/local/python/lib/python2.6/zipfile.py", line 696, in __init__
  42.     self._GetContents()
  43.   File "/usr/local/python/lib/python2.6/zipfile.py", line 716, in _GetContents
  44.     self._RealGetContents()
  45.   File "/usr/local/python/lib/python2.6/zipfile.py", line 728, in _RealGetContents
  46.     raise BadZipfile, "File is not a zip file"
  47. BadZipfile: File is not a zip file
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top