Path: csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod From: Barry Warsaw Newsgroups: linux.debian.maint.python,linux.debian.devel Subject: Re: mkdocs locale error building djangorestframework Date: Tue, 26 Jan 2016 05:20:03 +0100 Message-ID: References: X-Original-To: debian-python@lists.debian.org X-Mailbox-Line: From debian-python-request@lists.debian.org Tue Jan 26 04:14:07 2016 Old-Return-Path: X-Amavis-Spam-Status: No, score=-10.879 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, FOURLA=0.1, LDO_WHITELIST=-5, MISSING_HEADERS=1.021, PGPSIGNATURE=-5] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -5 Organization: The Organization of Unorganized Woozalists X-Mailer: Claws Mail 3.13.1 (GTK+ 2.24.29; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/wDPN1WwQzqLcMJ0qbU1JiVI"; protocol="application/pgp-signature" X-Mailing-List: archive/latest/13485 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/20160125231349.202097d1@subdivisions.wooz.org Approved: robomod@news.nic.it Lines: 47 Sender: robomod@news.nic.it X-Original-Cc: debian-devel@lists.debian.org, debian-python@lists.debian.org, python3-click@packages.debian.org X-Original-Date: Mon, 25 Jan 2016 23:13:49 -0500 X-Original-Message-ID: <20160125231349.202097d1@subdivisions.wooz.org> X-Original-References: <87fuxl6v58.fsf@prune.linuxpenguins.xyz> <1453768975.3734.251.camel@decadent.org.uk> <877fix6u7m.fsf@prune.linuxpenguins.xyz> <1453770777.3734.260.camel@decadent.org.uk> Xref: csiph.com linux.debian.maint.python:8162 linux.debian.devel:70145 --Sig_/wDPN1WwQzqLcMJ0qbU1JiVI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Jan 26, 2016, at 01:12 AM, Ben Hutchings wrote: >That's not the problem at all. =C2=A0Read the error message again. =C2=A0R= ead the >source line it points to. =C2=A0Now look at where rv comes from: > >>>> import subprocess >>>> rv =3D subprocess.Popen(['locale', '-a'], stdout=3Dsubprocess.PIPE, =20 >...=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0stderr= =3Dsubprocess.PIPE).communicate()[0] >>>> type(rv) =20 > For Python 3, try adding `universal_newlines=3DTrue` to any subprocess call. You'll get back a str. Cheers, -Barry --Sig_/wDPN1WwQzqLcMJ0qbU1JiVI Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWpvJ9AAoJEBJutWOnSwa/ZpoQAIlKjhmrGwHnYJttVcVzCjKI 4BHwG2FzAAV4QJz2zKM0vSJ3OnPZthy0ySQ3Si3RIOAD1DvKGcg05TAgprON4yFx QHWv6JOJPKKnB0zedGEgRuDGkcnqCxtLD2nDm4lqa+TIerE0IuDBnpWM4JO9UDPG 9aLeQdW51zlliuZ6DBInDn8gW+xqknkyBne9wS5o/hkMWkInMxPUCdswHy1s9cUm xoFAXbvAdDKivGUxVTU97+dV5YO4o1qEEOgFEy3g0BkMYM5I22UegXaEpe2pQ4Aq P72BJ2GcvW0OdBw4TYketVv+7f+AIsyXSEKPxYOMZcBcQkBXAuinOJL3rRQEssBn g8dbiAxJJLe4YbU1qp2Y7heIjnD2m8e6yUyAwRJkghKZL8lPs6vmdRlzw50VKC3+ as4773oG/PvWRO7DICQYMmTclQuLy1feIpnaDVb+dBdUEBBpdRTKZFNYn3q3MLQI iKhXBIH11AKc6GUyaQsE9uzHKqnjEYunAOu37yQfl1qTsn5Ym0O7+02F8hiOjXab Yin1dUsh1C/PIO7xbC1AkFTNdGcAwIkQFgTha7cWve0IY1XekigH3rxGvgepNmDc BRrsEjjHPCUfON8o68HipXgQ5na9OGX9U0qrdrvR/9G4D1LSaBEHzYOi9OaQjk9F a4K80nacxVgrDYeCJoRs =MpPe -----END PGP SIGNATURE----- --Sig_/wDPN1WwQzqLcMJ0qbU1JiVI--