Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Aug 2020 15:07:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        python@FreeBSD.org
Subject:   [Bug 248834] devel/py-appdirs: Configure phase fails with UnicodeDecodeError in 'ascii' codec
Message-ID:  <bug-248834-21822@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D248834

            Bug ID: 248834
           Summary: devel/py-appdirs: Configure phase fails with
                    UnicodeDecodeError in 'ascii' codec
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
               URL: https://github.com/ActiveState/appdirs/pull/152
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: python@FreeBSD.org
          Reporter: john@saltant.com
                CC: python@FreeBSD.org
             Flags: maintainer-feedback?(python@FreeBSD.org)
          Assignee: python@FreeBSD.org
 Attachment #217444 maintainer-approval?(python@FreeBSD.org)
             Flags:
                CC: python@FreeBSD.org
             Flags: merge-quarterly?

Created attachment 217444
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D217444&action=
=3Dedit
devel/py-appdirs: Backport explicit encoding patch

Symptom
=3D=3D=3D=3D=3D=3D=3D

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<phase=
: configure      >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D>  Configuring for py36-appdirs-1.4.4
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 25, in <module>
    for line in read("appdirs.py").splitlines():
  File "setup.py", line 19, in read
    out =3D "\n" + inf.read().replace("\r\n", "\n")
  File "/usr/local/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc8 in position 129:
ordinal not in range(128)
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/py-appdirs

Analysis
=3D=3D=3D=3D=3D=3D=3D=3D

The appdirs.py file is UTF-8 encoded, and under certain circumstances, the
built-in `open` function will guess the wrong encoding.

QA
=3D=3D

portlint: OK
poudriere: OK -- testport on 12.1R amd64 w/py27, py35, py36, py37 (default),
and py38

Note: The attached patch does not increment PORTREVISION because if the bug=
 is
triggered, no package is produced.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-248834-21822>