[Ml-yokadi] problem with locale
Aurélien Gâteau
aurelien.gateau at free.fr
Mar 14 Avr 23:36:33 CEST 2009
Heinz Wiesinger wrote:
> Hello again!
>
> I'm now trying yokadi on a remote server for task tracking. I face a weird
> problem there, maybe someone can help me.
>
> The remote server is a CentOS 5 system, with python 2.4. When I start yokadi I
> get the following error message:
>
> Traceback (most recent call last):
> File "/usr/bin/yokadi", line 12, in ?
> yokadi.main()
> File "/usr/lib/python2.4/site-packages/yokadi/yokadi.py", line 154, in main
> locale.setlocale(locale.LC_ALL, locale.getdefaultlocale())
> File "/usr/lib64/python2.4/locale.py", line 381, in setlocale
> return _setlocale(category, locale)
> locale.Error: unsupported locale setting
>
> $LANG is set to "en_US.UTF-8", as it is on my Slackware system. However, while
> locale.getdefaultlocale() returns "('en_US', 'UTF8')", the CentOS system
> returns "('en_US', 'utf')"
>
> I found something related here: http://bugs.python.org/issue1699853>.
Hi Heinz,
Can you try replacing the faulty line with:
locale.setlocale(locale.LC_ALL, os.environ.get("LANG", "C"))
Aurélien
Plus d'informations sur la liste de diffusion Ml-yokadi