Executing Python code, I get the error (from python2.7)
unknown locale en_US
The locale is on my computer, since it’s in the list I get after typing locale -a
openerp@jem /usr/lib/python2.7 [4]$ locale -a C C.UTF-8 POSIX de_BE.utf8 en_AG en_AG.utf8 en_AU.utf8 en_BW.utf8 en_CA.utf8 en_DK.utf8 en_GB.utf8 en_HK.utf8 en_IE.utf8 en_IN en_IN.utf8 en_NG en_NG.utf8 en_NZ.utf8 en_PH.utf8 en_SG.utf8 en_US en_US.iso88591 en_US.utf8 en_ZA.utf8 en_ZM en_ZM.utf8 en_ZW.utf8 fr_BE.utf8 fr_CA.utf8 fr_CH.utf8 fr_FR.utf8 fr_LU.utf8
Searching answer from forums, I found and tried the following command lines :
- check which locales are supported :
less /usr/share/i18n/SUPPORTED
- add the locales you want (for example fr) :
sudo locale-gen en_US sudo locale-gen en_US.UTF8
- Don’t forget to update the locale list with
sudo update-locale
Nothings changed, I still get the exception. So I tried to reconfigure the locale with
echo ru_RU.UTF8 >> /var/lib/locales/supported.d/local sudo dpkg-reconfigure locales
Still Nothing works :/
Finally, the good thing to do was to reinstall the python locale
sudo apt-get install --reinstall python-babel-localedata
Yeah ! \0/