Skip to content

Instantly share code, notes, and snippets.

@ambv
Created June 15, 2014 02:13
Show Gist options
  • Save ambv/ff0c793c050bbd701c7b to your computer and use it in GitHub Desktop.
Save ambv/ff0c793c050bbd701c7b to your computer and use it in GitHub Desktop.
Steps to reproduce the Unicode bug
$ pip install testunicodepackagedependant
Downloading/unpacking testunicodepackagedependant
Downloading testunicodepackagedependant-1.0.tar.gz
Storing download in cache at /Users/ambv/.pip/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Ft%2Ftestunicodepackagedependant%2Ftestunicodepackagedependant-1.0.tar.gz
Running setup.py (path:/private/tmp/testestest/build/testunicodepackagedependant/setup.py) egg_info for package testunicodepackagedependant
Downloading/unpacking testunicodepackage==1.0 (from testunicodepackagedependant)
Downloading testunicodepackage-1.0.tar.gz
Cleaning up...
Exception:
Traceback (most recent call last):
File "/private/tmp/testestest/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/private/tmp/testestest/lib/python2.7/site-packages/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/private/tmp/testestest/lib/python2.7/site-packages/pip/req.py", line 1197, in prepare_files
do_download,
File "/private/tmp/testestest/lib/python2.7/site-packages/pip/req.py", line 1375, in unpack_url
self.session,
File "/private/tmp/testestest/lib/python2.7/site-packages/pip/download.py", line 582, in unpack_http_url
unpack_file(temp_location, location, content_type, link)
File "/private/tmp/testestest/lib/python2.7/site-packages/pip/util.py", line 625, in unpack_file
untar_file(filename, location)
File "/private/tmp/testestest/lib/python2.7/site-packages/pip/util.py", line 556, in untar_file
path = os.path.join(location, fn)
File "/private/tmp/testestest/bin/../lib/python2.7/posixpath.py", line 80, in join
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 1: ordinal not in range(128)
Storing debug log for failure in /Users/ambv/.pip/pip.log
$ pip install testunicodepackage
Downloading/unpacking testunicodepackage
Downloading testunicodepackage-1.0.tar.gz
Storing download in cache at /Users/ambv/.pip/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Ft%2Ftestunicodepackage%2Ftestunicodepackage-1.0.tar.gz
Running setup.py (path:/private/tmp/testestest/build/testunicodepackage/setup.py) egg_info for package testunicodepackage
Installing collected packages: testunicodepackage
Running setup.py install for testunicodepackage
Successfully installed testunicodepackage
Cleaning up...
$ pip install testunicodepackagedependant
Downloading/unpacking testunicodepackagedependant
Using download cache from /Users/ambv/.pip/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Ft%2Ftestunicodepackagedependant%2Ftestunicodepackagedependant-1.0.tar.gz
Running setup.py (path:/private/tmp/testestest/build/testunicodepackagedependant/setup.py) egg_info for package testunicodepackagedependant
Requirement already satisfied (use --upgrade to upgrade): testunicodepackage==1.0 in ./lib/python2.7/site-packages (from testunicodepackagedependant)
Installing collected packages: testunicodepackagedependant
Running setup.py install for testunicodepackagedependant
Successfully installed testunicodepackagedependant
Cleaning up...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment