Summary: | lang/python36: Unreasonable error: UnicodeDecodeError: 'ascii' codec can't decode byte | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Yuri Victorovich <yuri> |
Component: | Individual Port(s) | Assignee: | Kubilay Kocak <koobs> |
Status: | Closed Not A Bug | ||
Severity: | Affects Only Me | CC: | python |
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(python) |
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Yuri Victorovich
2018-09-24 02:36:43 UTC
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 |