[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2021-02-25 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2016-09-12 Thread Eryk Sun
Eryk Sun added the comment: > It might be worth testing a patch that changes expanduser to > decode the environment variables If expanduser() is passed a unicode path, it can use _winreg.ExpandEvironmentStrings(u'%USERPROFILE%') instead of decoding os.environ['USERPROFILE']. In 2.7,

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2016-09-12 Thread Robert Collins
Robert Collins added the comment: Given two (or more) parameters where one is unicode and one is not, upcasting will occur multiples times in path.join on windows: - '\\' is str and will cast up safely in all codecs - the other str (or bytes) parameter will be upcast using

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2015-02-15 Thread Vinay Sajip
Vinay Sajip added the comment: There is a bug in distlib.resources. As far as I know, this is no longer the case - a change was made in distlib.resources to get around the problem:

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2015-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, the implementation of os.path is alright. There is a bug in distlib.resources. And the lack of os.path documentation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20140

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2015-01-13 Thread Lin Wei
Lin Wei added the comment: The patch (http://bugs.python.org/issue9291#msg206938) for #9291 actually helps with this issue, at least for me. By the way, @Serhiy do you mean that the problem is merely documentation, while the implementation is alright? -- nosy: +Lin.Wei

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2014-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This looks to me as documentation issue. Unfortunately it is not explicitly documented that os.path.join() shouldn't mix str and unicode components (except ascii-only str, such as '.'). There is relevant note in 3.x documentation. It should be adapted to

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2014-05-27 Thread honglei jiang
honglei jiang added the comment: Python:canopy-1.3.0.1715.win-x86_64\ OS:Win8.1 64 directory 'F:\\Flask\\EmberJS\\\xd6\xd0\xce\xc4\\Prj\\static' os.path.isdir(directory) True filename u'todomvc/architecture-examples/angularjs/index.html' os.path.join(directory,filename) Traceback (most recent

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2014-01-07 Thread Jarek Śmiejczak
Jarek Śmiejczak added the comment: @Vinay.Sajip After adding change you suggested i'm getting different error: --- C:\Users\Jarosławpip install virtualenv Downloading/unpacking virtualenv Running setup.py (path:c:\users\jarosa~1\appdata\local\temp\pip_build_Jaros│a \virtualenv\setup.py)

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2014-01-06 Thread Jarek Śmiejczak
New submission from Jarek Śmiejczak: Full traceback: https://gist.github.com/jarekps/2729ee1917ea372e6642 Error's starts in pip but after investigation of traceback it looks like it is python's issue (version 2.7.5). Windows version: 8.1 Enterprise x64 with Polish language pack. Feel free to

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2014-01-06 Thread STINNER Victor
STINNER Victor added the comment: https://gist.github.com/jarekps/2729ee1917ea372e6642 Copy of the output: --- C:\Users\Jarosławpip 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

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2014-01-06 Thread Vinay Sajip
Vinay Sajip added the comment: It's not failing specifically because of distlib or os.path.join functionality: it's failing because, given a Unicode path C:\Users\Jarosław\..., Python is attempting to decode it using the default, ASCII codec. I'll certainly look at updating distlib to handle

[issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs

2014-01-06 Thread Vinay Sajip
Vinay Sajip added the comment: Jarek: I can't easily test this in my environment; perhaps you can help. Could you change, in the file c:\python27\lib\site-packages\pip\_vendor\distlib\resources.py, line 40 from base = os.path.join(get_cache_base(), 'resource-cache') to