-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix Interpreter discovery bug wrt. Microsoft Store shortcut using Latin-1 #3006
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Interpreter discovery bug wrt. Microsoft Store shortcut using Latin-1 #3006
Conversation
…devikar/virtualenv into users/rahuldevikar/fix2812
|
All tests are succeeding here: https://github.com/rahuldevikar/virtualenv/actions/runs/20727523037 Cc: @gaborbernat (Sorry for tagging, do let me know if there is a better way to communicate on such issues) |
When virtualenv performs interpreter discovery on Windows, it spawns a subprocess to run the py_info.py script for each discovered Python interpreter. On systems where the Microsoft Store Python shortcut exists (but Python wasn't installed via MS Store), invoking this shortcut returns an error message in CP1252 encoding. On systems with non-English locales (e.g., German), these error messages contain characters like umlauts (ü) that can't be decoded as UTF-8, causing UnicodeDecodeError exceptions to appear in the terminal.
Use Latin-1 instead
update:
Forcing subprocess to use utf-8 mode