homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: virtual conf file encoding error on windows
Type: crash Stage: resolved
Components: Versions: Python 3.5
process
Status: closed Resolution: out of date
Dependencies: Superseder: Inconsistency between venv and site
View: 25185
Assigned To: Nosy List: serhiy.storchaka, tanbro
Priority: normal Keywords:

Created on 2015年11月03日 06:58 by tanbro, last changed 2022年04月11日 14:58 by admin. This issue is now closed.

Messages (2)
msg253968 - (view) Author: tanbro (tanbro) Date: 2015年11月03日 06:58
When create a new `venv` on windows, sometimes an `UnicodeDecodeError` occurred.
It seems that, it is caused by the system module `site`.
In `Lib/site.py`, line 468::
 with open(virtual_conf) as f:
 for line in f:
 line = line.strip()
The file `virtual_conf` was open with encoding `gbk` which is my windows default encoding, but in fact, the file is an `utf-8` one, so i think it should be::
 with open(virtual_conf, encoding='utf-8') as f:
 for line in f:
 line = line.strip()
msg253974 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015年11月03日 09:09
Already fixed in issue25185.
History
Date User Action Args
2022年04月11日 14:58:23adminsetgithub: 69726
2015年11月03日 09:09:21serhiy.storchakasetstatus: open -> closed

superseder: Inconsistency between venv and site

nosy: + serhiy.storchaka
messages: + msg253974
resolution: out of date
stage: resolved
2015年11月03日 06:58:31tanbrocreate

AltStyle によって変換されたページ (->オリジナル) /