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.

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:31tanbrosetrecipients: + tanbro
2015-11-03 06:58:31tanbrosetmessageid: <1446533911.62.0.714179099115.issue25540@psf.upfronthosting.co.za>
2015-11-03 06:58:31tanbrolinkissue25540 messages
2015-11-03 06:58:31tanbrocreate