You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to install paramiko which one of it's dependencies is pycparser. When zipfile.py gets a hold of it it throws a zipfile.BadZipFile: File is not a zip file exception. It seems to me that this may not be the case because I added debug prints and every dependency is a .whl file, pycparser included. The one strange thing I found was that all other dependency .whl files were in /tmp but the pycparser .whl file was in /run. I don't know if this would cause an issue? Looking into what the actual error is, I found that on line 248 of zipfile.py from python 3.5, fpin.seek(-sizeEndCentDir, 2) is throwing a OSError(22, 'Invalid Arguments'). Googling this issue it sounds like this is a 'End of Central Directory' error. Does anyone know what this means?
Does this happen to anyone else? It looked like a possible solution was to download the source from a different mirror. Is it possible to configure where these packages are being downloaded from or is it all from python repos?
$ pipenv install pycparser
Installing pycparser…
Collecting pycparser
Error: An error occurred while installing pycparser!
Cache entry deserialization failed, entry ignored
Exception:
Traceback (most recent call last):
File "/home/jesse/.local/share/virtualenvs/backup-USSidNT4/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/jesse/.local/share/virtualenvs/backup-USSidNT4/lib/python3.5/site-packages/pip/commands/install.py", line 335, in run
wb.build(autobuilding=True)
File "/home/jesse/.local/share/virtualenvs/backup-USSidNT4/lib/python3.5/site-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/home/jesse/.local/share/virtualenvs/backup-USSidNT4/lib/python3.5/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/home/jesse/.local/share/virtualenvs/backup-USSidNT4/lib/python3.5/site-packages/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "/home/jesse/.local/share/virtualenvs/backup-USSidNT4/lib/python3.5/site-packages/pip/download.py", line 809, in unpack_url
unpack_file_url(link, location, download_dir, hashes=hashes)
File "/home/jesse/.local/share/virtualenvs/backup-USSidNT4/lib/python3.5/site-packages/pip/download.py", line 715, in unpack_file_url
unpack_file(from_path, location, content_type, link)
File "/home/jesse/.local/share/virtualenvs/backup-USSidNT4/lib/python3.5/site-packages/pip/utils/__init__.py", line 600, in unpack_file
flatten=not filename.endswith('.whl')
File "/home/jesse/.local/share/virtualenvs/backup-USSidNT4/lib/python3.5/site-packages/pip/utils/__init__.py", line 485, in unzip_file
zip = zipfile.ZipFile(zipfp, allowZip64=True)
File "/usr/lib64/python3.5/zipfile.py", line 1026, in __init__
self._RealGetContents()
File "/usr/lib64/python3.5/zipfile.py", line 1094, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
I just deleted the file and retried install pycparser. It looks like that fixed it. Based on a stackover flow I saw I would guess the .whl file was corrupt. Closing issue.
I'm trying to install paramiko which one of it's dependencies is pycparser. When
zipfile.py
gets a hold of it it throws azipfile.BadZipFile: File is not a zip file
exception. It seems to me that this may not be the case because I added debug prints and every dependency is a .whl file, pycparser included. The one strange thing I found was that all other dependency .whl files were in /tmp but the pycparser .whl file was in /run. I don't know if this would cause an issue? Looking into what the actual error is, I found that on line 248 of zipfile.py from python 3.5,fpin.seek(-sizeEndCentDir, 2)
is throwing a OSError(22, 'Invalid Arguments'). Googling this issue it sounds like this is a 'End of Central Directory' error. Does anyone know what this means?Does this happen to anyone else? It looked like a possible solution was to download the source from a different mirror. Is it possible to configure where these packages are being downloaded from or is it all from python repos?
The file it chokes on is:
The text was updated successfully, but these errors were encountered: