debian - Missing en_US locale required for python -
i'm not sure if place ask error. somehow seem not have locale on debian linux system. basically, became aware of when python program trying run executed line locale.setlocale(locale.lc_all, 'en_us')
. error:
traceback (most recent call last):
file "", line 1, in
file "runserver.py", line 4, in
site = tarbellsite(os.path.dirname(os.path.abspath(file)))
file "/home/brian/.virtualenvs/tarbell/src/flask-tarbell/tarbell/app.py", line 36, in init
self.projects = self.load_projects()
file "/home/brian/.virtualenvs/tarbell/src/flask-tarbell/tarbell/app.py", line 59, in load_projects
project = imp.load_module(name, filename, pathname, description)
file "/home/brian/code/contrib/tarbell/base/config.py", line 28, in
locale.setlocale(locale.lc_all, 'en_us')
file "/home/brian/.virtualenvs/tarbell/lib/python2.7/locale.py", line 547, in setlocale
return _setlocale(category, locale)
locale.error: unsupported locale setting
however, researching relevant extant questions on this one, tells me run locale -a
, yields:
c
c.utf-8
en_us.utf8
posix
so, looks english in locales on system. doing wrong? running various other road blocks. sudo apt-get install language-pack-en
according lot of places on internet gets english language pack. apt complains package doesn't exist. how damn locale?
try add 'utf8' bit well;
import locale locale.getlocale() >>> (none, none) locale.setlocale(locale.lc_all, 'en_us.utf8') >>> 'en_us.utf8' locale.getlocale() >>> ('en_us', 'utf-8')
Comments
Post a Comment