[Biopython-dev] Python 3.4 - UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3

Peter Cock p.j.a.cock at googlemail.com
Thu May 1 14:45:05 UTC 2014


On Thu, May 1, 2014 at 2:58 PM, Tiago Antao <tra at popgen.net> wrote:
> Hi,
>
> On Wed, 30 Apr 2014 11:02:52 +0100
> Peter Cock <p.j.a.cock at googlemail.com> wrote:
>
>> These are deliberate tests of accented characters (and other
>> non-ASCII text) in a unicode description. Both XML files says they
>> are using UTF-8 as the encoding.
>
>
> I have added locale support to docker and now tests pass.
> That being said, it seems that the code is using the machine locale
> (not the XML locale) and thus, if the default locale is not utf-8 maybe
> the tests will fail. This might be very minor as probably most machines
> are utf-8 defaulted anyway...
>
> Tiago

Thanks Tiago,

I'd have to go away and read the XML library documentation
about how the encoding should be handled vs the Python
open encoding option.

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.

Peter



More information about the Biopython-dev mailing list