[Bug 231650] lang/python36: Unreasonable error: UnicodeDecodeError: 'ascii' codec can't decode byte

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Sep 24 04:11:44 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231650

Kubilay Kocak <koobs at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|python at FreeBSD.org          |koobs at FreeBSD.org
             Status|New                         |Closed
                 CC|                            |python at FreeBSD.org
         Resolution|---                         |Not A Bug

--- Comment #1 from Kubilay Kocak <koobs at FreeBSD.org> ---
This is a common class of bug not specific to FreeBSD.

Without an encoding specified for the open() method, it relies on the default
system encoding(non-deterministic), which may not be UTF8 (in this case ascii)
[1].

The solution is to specify the encoding to be used, so as not to be
platform/system dependent.

Examples: 

 * https://bugs.launchpad.net/pbr/+bug/1704472
 * https://github.com/mozilla/unicode-slugify/issues/16
 *
https://bitbucket.org/genomeinformatics/simlord/issues/1/error-when-installing-simlord-ascii-codec
 * https://github.com/morepath/morepath/issues/286
 * https://github.com/chaoss/grimoirelab-perceval/issues/32
 * https://github.com/rbarrois/python-semanticversion/issues/13

 * Many others. Google: "setup.py" "codec can't decode byte" site:.github.com

[1] https://docs.python.org/3/library/functions.html#open

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the freebsd-python mailing list