You are not logged in.

#1 2007-04-06 10:41:42

Sachiel
Member
Registered: 2007-04-06
Posts: 16
Website

Problem with locale and python ¿after upgrades?

After a not very long time without programming/using python, I need it again, but when I ran drpython I get this error:

[sachiel@Acer ~]$ drpython
Traceback (most recent call last):
  File "/usr/share/drpython/drpython.pyw", line 35, in <module>
    import drpython
....
  File "/usr/lib/python2.5/locale.py", line 512, in getpreferredencoding
    setlocale(LC_CTYPE, "")
  File "/usr/lib/python2.5/locale.py", line 476, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

I used it on the past, so I guess I made some change/upgrade to the system which affected my locale settings. I checked other posts in the forum, and usually recommend reviewing /etc/locale.gen, rc.conf and running locale-gen. So, my config:

Uncommented in /etc/locale.gen:
  ca_ES.UTF-8
  ca_ES.ISO-8859-1
  ca_ES.ISO-8859-15@euro
  en_GB.UTF-8
  en_GB.ISO-8859-1
  en_US.UTF-8
  en_US.ISO-8859-1
  es_ES.UTF-8
  es_ES.ISO-8859-1
  es_ES.ISO-8859-15@euro

Locale setting in /etc/rc.conf:
LOCALE="ca_ES@EURO"

Output of locale-gen:
# locale-gen
Generating locales...
  ca_ES.UTF-8... done
  ca_ES.ISO-8859-1... done
  ca_ES.ISO-8859-15@euro... done
  en_GB.UTF-8... done
  en_GB.ISO-8859-1... done
  en_US.UTF-8... done
  en_US.ISO-8859-1... done
  es_ES.UTF-8... done
  es_ES.ISO-8859-1... done
  es_ES.ISO-8859-15@euro... done
Generation complete.

Output of locale -a:
# locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
C
POSIX
ca_ES
ca_ES.iso88591
ca_ES.iso885915@euro
ca_ES.utf8
ca_ES@euro
catalan
en_GB
en_GB.iso88591
en_GB.utf8
en_US
en_US.iso88591
en_US.utf8
es_ES
es_ES.iso88591
es_ES.iso885915@euro
es_ES.utf8
es_ES@euro
spanish

AFAIK, everything looks ok (except the LC_CTYPE and LC_MESSAGES from locale -a). What I am missing?

Offline

Board footer

Powered by FluxBB