nutritious-monkey-78516
11/27/2018, 5:02 PMpants.bin.pants_loader.InvalidLocaleError: System preferred encoding is `ANSI_X3.4-1968`, but `UTF-8` is required.
hundreds-father-404
11/27/2018, 5:13 PMnutritious-monkey-78516
11/27/2018, 5:14 PMaloof-angle-91616
11/27/2018, 6:12 PMPANTS_IGNORE_UNRECOGNIZED_ENCODING=1
should allow you to bypass this for now, otherwise setting LC_ALL
and LANG
env vars to en_US.UTF-8
is what the error message usually sayshundreds-father-404
11/27/2018, 6:13 PMENV LC_ALL="en_US.UTF-8"
aloof-angle-91616
11/27/2018, 6:14 PMLC_ALL
and LANG
because it runs setlocale
under the hood and you have to do some ridiculous ubuntu nonsense to get it to just let you set the env varhundreds-father-404
11/27/2018, 6:15 PMnutritious-monkey-78516
11/27/2018, 6:16 PMhundreds-father-404
11/27/2018, 6:17 PMnutritious-monkey-78516
11/27/2018, 6:18 PMhundreds-father-404
11/27/2018, 6:23 PMimport locale
encoding = locale.getpreferredencoding()
if encoding.lower() != 'utf-8' and os.environ.get(cls.ENCODING_IGNORE_ENV_VAR, None) is None:
aloof-angle-91616
11/27/2018, 6:25 PMlocale
module to return utf-8
, so people can search the docs themselves to see how to satisfy that. the current message is great though)hundreds-father-404
11/27/2018, 6:26 PMPANTS_IGNORE_UNRECOGNIZED_ENCODING=true
to bypass this error, although we cannot guarantee things will work correctly because we expect UTF-8, or we have to figure out how to get Python std lib’s locale.getpreferredencoding()
to return utf-8
aloof-angle-91616
11/27/2018, 6:29 PMhundreds-father-404
11/27/2018, 6:31 PMaloof-angle-91616
11/27/2018, 6:31 PMnutritious-monkey-78516
11/27/2018, 6:36 PMaloof-angle-91616
11/27/2018, 6:37 PMnutritious-monkey-78516
11/27/2018, 6:37 PMaloof-angle-91616
11/27/2018, 6:38 PMhundreds-father-404
11/27/2018, 6:41 PMnutritious-monkey-78516
11/27/2018, 7:08 PMhundreds-father-404
11/27/2018, 7:17 PMnutritious-monkey-78516
11/27/2018, 7:34 PMhundreds-father-404
11/27/2018, 7:55 PM