[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]
<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:

Jakub Wilk

Reply to: