[New-bugs-announce] [issue32409] venv activation doesn't work, if project is in a Windows folder that has latin-1 supplement characters (such as ä,ö,å) in its path
Jaakko Roponen
report at bugs.python.org
Fri Dec 22 05:36:15 EST 2017
New submission from Jaakko Roponen <roponenjaakko at gmail.com>:
Let's say I have a folder c:\test-ä in Windows
Now if I run: py -m venv env
and activate: env\scripts\activate
and check: where python
the result is incorrectly just: C:\Users\Username\AppData\Local\Programs\Python\Python36\python.exe
If I run: path
the result is: PATH=C:\test-ä\env\Scripts;...
So clearly the encoding is broken for the folder name.
I can fix this by changing activate.bat character encoding to OEM-US and then replacing "test-├ż" by "test-ä".
If I now activate and run: where python
the result is (as should be):
C:\test-ä\env\Scripts\python.exe
C:\Users\Username\AppData\Local\Programs\Python\Python36\python.exe
By running: path
I get: PATH=C:\test-ä\env\Scripts;...
So looks good here as well.
I suggest that what ever is creating activate.bat file, is using incorrect character encoding for the creation of the file. If this is somehow platform specific, there could be a guide in the venv documentation about how to fix this.
----------
components: Extension Modules
messages: 308931
nosy: Jac0
priority: normal
severity: normal
status: open
title: venv activation doesn't work, if project is in a Windows folder that has latin-1 supplement characters (such as ä,ö,å) in its path
type: behavior
versions: Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32409>
_______________________________________
More information about the New-bugs-announce
mailing list