Message253968
| Author |
tanbro |
| Recipients |
tanbro |
| Date |
2015年11月03日.06:58:31 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1446533911.62.0.714179099115.issue25540@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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() |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年11月03日 06:58:31 | tanbro | set | recipients:
+ tanbro |
| 2015年11月03日 06:58:31 | tanbro | set | messageid: <1446533911.62.0.714179099115.issue25540@psf.upfronthosting.co.za> |
| 2015年11月03日 06:58:31 | tanbro | link | issue25540 messages |
| 2015年11月03日 06:58:31 | tanbro | create |
|