#24408 closed Bug (invalid)
"pip install .../master.zip" fails with UnicodeEncodeError in pip
| Reported by: | Daniel Hahler | Owned by: | nobody |
|---|---|---|---|
| Component: | Packaging | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
After
https://github.com/django/django/commit/bd059e3f8c6311dcaf8afe5e29ef373f7f84cf26
installing master from a Github zip fails on Python 2 (2.7.9), using pip 6.0.8:
% pip install https://github.com/django/django/archive/master.zip
DEPRECATION: --download-cache has been deprecated and will be removed in the future. Pip now automatically uses and configures its cache.
Collecting https://github.com/django/django/archive/master.zip
Downloading https://github.com/django/django/archive/master.zip (11.4MB)
100% |################################| 11.4MB 42kB/s
Exception:
Traceback (most recent call last):
File "…/venv/lib/python2.7/site-packages/pip/basecommand.py", line 232, in main
status = self.run(options, args)
File "…/venv/lib/python2.7/site-packages/pip/commands/install.py", line 339, in run
requirement_set.prepare_files(finder)
File "…/venv/lib/python2.7/site-packages/pip/req/req_set.py", line 355, in prepare_files
do_download, session=self.session,
File "…/venv/lib/python2.7/site-packages/pip/download.py", line 782, in unpack_url
session,
File "…/venv/lib/python2.7/site-packages/pip/download.py", line 671, in unpack_http_url
unpack_file(from_path, location, content_type, link)
File "…/venv/lib/python2.7/site-packages/pip/utils/__init__.py", line 648, in unpack_file
flatten=not filename.endswith('.whl')
File "…/venv/lib/python2.7/site-packages/pip/utils/__init__.py", line 528, in unzip_file
leading = has_leading_dir(zip.namelist()) and flatten
File "…/venv/lib/python2.7/site-packages/pip/utils/__init__.py", line 253, in has_leading_dir
prefix, rest = split_leading_dir(path)
File "…/venv/lib/python2.7/site-packages/pip/utils/__init__.py", line 237, in split_leading_dir
path = str(path)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2297' in position 60: ordinal not in range(128)
The affected file isn't included in the normal package/wheel (because it's in tests/), but the above procedure is commonly used to test packages against Django master / unreleased branches.
Change History (2)
comment:1 by , 11 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
comment:2 by , 11 years ago
Yes, it's a bug in pip, triggered by the change in Django.
I was asked to file an issue here (https://github.com/django/django/commit/bd059e3f8c6311dcaf8afe5e29ef373f7f84cf26#commitcomment-9896566), because currently it prevents installing Django using this method (where test files are included / handled).
Looks like a bug in pip not Django. It might be fixed by https://github.com/pypa/pip/pull/1473.