[Ml-yokadi] problem with locale

Heinz Wiesinger HMWiesinger at liwjatan.at
Mer 15 Avr 00:21:18 CEST 2009


On Tuesday 14 April 2009 23:36:33 Aurélien Gâteau wrote:
> 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"))

Tested, works on both Slackware and CentOS.
Thank you very much :)

Grs,
Heinz
-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <http://sequanux.org/pipermail/ml-yokadi/attachments/20090415/6ce0cdf8/attachment.htm>
-------------- section suivante --------------
Une pièce jointe autre que texte a été nettoyée...
Nom: non disponible
Type: application/pgp-signature
Taille: 197 octets
Desc: This is a digitally signed message part.
URL: <http://sequanux.org/pipermail/ml-yokadi/attachments/20090415/6ce0cdf8/attachment.pgp>


Plus d'informations sur la liste de diffusion Ml-yokadi