STINNER Victor added the comment:

> https://gist.github.com/jarekps/2729ee1917ea372e6642

Copy of the output:
---
C:\Users\Jarosław>pip
Traceback (most recent call last):
File "c:\python27\Scripts\pip-script.py", line 9, in <module>
load_entry_point('pip==1.5', 'console_scripts', 'pip')()
File 
"c:\python27\lib\site-packages\distribute-0.6.49-py2.7.egg\pkg_resources.py", 
line 345, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File 
"c:\python27\lib\site-packages\distribute-0.6.49-py2.7.egg\pkg_resources.py", 
line 2381, in load_entry_point
return ep.load()
File 
"c:\python27\lib\site-packages\distribute-0.6.49-py2.7.egg\pkg_resources.py", 
line 2087, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "c:\python27\lib\site-packages\pip\__init__.py", line 11, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "c:\python27\lib\site-packages\pip\vcs\subversion.py", line 4, in <module>
from pip.index import Link
File "c:\python27\lib\site-packages\pip\index.py", line 16, in <module>
from pip.wheel import Wheel, wheel_ext, wheel_setuptools_support
File "c:\python27\lib\site-packages\pip\wheel.py", line 23, in <module>
from pip._vendor.distlib.scripts import ScriptMaker
File "c:\python27\lib\site-packages\pip\_vendor\distlib\scripts.py", line 15, 
in <module>
from .resources import finder
File "c:\python27\lib\site-packages\pip\_vendor\distlib\resources.py", line 
105, in <module>
cache = Cache()
File "c:\python27\lib\site-packages\pip\_vendor\distlib\resources.py", line 40, 
in __init__
base = os.path.join(get_cache_base(), 'resource-cache')
File "c:\python27\lib\ntpath.py", line 108, in join
path += "\\" + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb3 in position 14: 
ordinal not in range(128)
---

It looks like a bug in distlib.resources, not in Python.

os.path.join() works correctly if all arguments are bytes strings (str type). I 
should work if all arguments are Unicode strings only containing ASCII 
characters. (I don't know if it works if all aruments are Unicode strings.)

In your case, it looks like os.path.join() is called with a unicode and a bytes 
string.

----------
nosy: +haypo, ncoghlan, vinay.sajip

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20140>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to