[Biopython-dev] Python 3.4 - UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3
Tiago Antao
tra at popgen.net
Thu May 1 14:49:48 UTC 2014
On Thu, 1 May 2014 15:45:05 +0100
Peter Cock <p.j.a.cock at googlemail.com> wrote:
> How did you manipulate the machine's locale, and what was it
> before you set it to utf-8? i.e. How can we reproduce this error.
This is the starting point:
https://docs.python.org/3.2/library/locale.html#locale.getdefaultlocale
>>> import locale
>>> locale.getlocale()
('en_GB', 'UTF-8')
If you set LC_ALL with something that is not utf-8 (say us ascii, maybe)
related you should be able to replicate this. You will want getlocale()
to NOT report utf-8 before running the test.
in my case I had this default:
('', '')
But I suspect anything that is not utf-8 compatible should do.
Tiago
More information about the Biopython-dev
mailing list