[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mkdocs locale error building djangorestframework



* Julien Cristau <jcristau@debian.org>, 2016-01-28, 14:01:
import subprocess
rv = subprocess.Popen(['locale', '-a'], stdout=subprocess.PIPE,
...                       stderr=subprocess.PIPE).communicate()[0]
type(rv)
<class 'bytes'>

For Python 3, try adding `universal_newlines=True` to any subprocess call. You'll get back a str.

Or a UnicodeDecodeError.

Avoid French and Norwegian locales and you're be good. :-P
Or upgrade to glibc 0.22, which guarantees that "locale -a" output is ASCII-only:
https://sourceware.org/bugzilla/show_bug.cgi?id=18412

--
Jakub Wilk


Reply to: