Comments (14)
Couldn't reproduce this in my own tests with
pip install
https://github.com/mitsuhiko/werkzeug/tarball/master#egg=Werkzeug-0.7dev
Not sure whether if Github fixed something or there is a difference between
using nodeload in the URL.
Original Comment By: Jannis Leidel
from pip.
github obviously changed behaviour (I also reported a bug there about the
missing content-type header).
but still pip needs fixing, because it'll still crash if it doesn't get a c-t
header.
Original Comment By: Thomas Waldmann
from pip.
Thomas, it seems you are running an older version of pip (0.7.2). Is it
possible for you to upgrade to pip 8.2? I am curious if you would still get
this error running pip 8.2
Original Comment By: Kelsey Hightower
from pip.
I can't reproduce this anymore but there was an issue with Github due not
sending a content type header. Following command failed for me with the same
error as above.
pip install https://github.com/divio/django-cms/tarball/master
I also think that pip should handle missing content type headers more
graceful. I use and used pip 0.8.2.
Original Comment By: Anonymous
from pip.
Thanks for the reply, I will work up a patch and get it ready for review.
Original Comment By: Kelsey Hightower
from pip.
Fixed in my fork:
https://bitbucket.org/khightower/pip/changeset/1bb3bf439fdb
The Solution
If the HTTP response header does not define the content-type, set it to an
empty string which supports the 'lower' attribute required by
mimetypes.guess_extension()
Original Comment By: Kelsey Hightower
from pip.
Created a new fork without named branches.
https://bitbucket.org/khightower/pip-issue-207/changeset/d486e99d8da4
Original Comment By: Kelsey Hightower
from pip.
Attaching gist for Kelsey's patch: https://gist.github.com/886024
(repository pip-issue-207 was removed)
from pip.
I'm having the same issue here:
$ pip install https://github.com/pypa/pip/archive/develop.zip
Downloading/unpacking https://github.com/pypa/pip/archive/develop.zip
Exception:
Traceback (most recent call last):
File "/Users/igor/.envs/removeme/lib/python2.7/site-packages/pip/basecommand.py", line 139, in main
status = self.run(options, args)
File "/Users/igor/.envs/removeme/lib/python2.7/site-packages/pip/commands/install.py", line 266, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Users/igor/.envs/removeme/lib/python2.7/site-packages/pip/req.py", line 1033, in prepare_files
self.unpack_url(url, location, self.is_download)
File "/Users/igor/.envs/removeme/lib/python2.7/site-packages/pip/req.py", line 1161, in unpack_url
retval = unpack_http_url(link, location, self.download_cache, self.download_dir)
File "/Users/igor/.envs/removeme/lib/python2.7/site-packages/pip/download.py", line 535, in unpack_http_url
content_type = resp.info()['content-type']
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/rfc822.py", line 388, in __getitem__
return self.dict[name.lower()]
KeyError: 'content-type'
$ pip --version
pip 1.3.1 from /Users/igor/.envs/removeme/lib/python2.7/site-packages (python 2.7)
from pip.
I was having this same issue earlier today with installing https://github.com/django/django-localflavor-us/archive/e81479b3a4.zip , but github is now sending the correct header to "fix" it.
Strange that it seems to be so intermittent...
from pip.
I've sent an email to github support, they said it was really a bug. Already fixed!
from pip.
We should certainly fail a bit more gracefully.
from pip.
Closing this issue because of pull request #872 with the fix.
from pip.
I ran into this issue today on the "develop" branch. PR forthcoming.
from pip.
Related Issues (20)
- Pip Install --no-dependencies still downloads and installs dependencies HOT 2
- --config-settings not passing --build-option values to clang on macos HOT 1
- FileNotFoundErro: [WinError 2] in `appdirs.py` on line with `_winreg.QueryValueEx(key, shell_folder_name)` HOT 1
- `pip` reports conflict between identical versions of the same package when installed both as editable package and and dependency of an editable package HOT 8
- check `conda list` before installing a package HOT 5
- Existed option --ignore-requires-python should work with pip-list also, not only with pip-install
- Documentation Error: Hashes are for integrity, not security HOT 21
- Unable to install .whl package HOT 5
- Configuration of username for index without enabling index HOT 3
- Upgrading packages that already fill requirements HOT 1
- site packages not working HOT 1
- Getting and persisting additional metadata in `pip install`s HOT 9
- pip refuses to install pipx in my user environment HOT 1
- pip wheel fails: No module named 'wheel' HOT 11
- [docs] Integrate `sphinx-issues` into the Sphinx config
- how did you slove this problem HOT 2
- ModuleNotFoundError: No module named 'requests_unixsocket' HOT 1
- [RFC] Making the changelog audience-oriented HOT 2
- Update urllib3 to 1.26.18 or above HOT 1
- A problem HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pip.