I'm having a strange problem today in my RHEL system. My python script is returning:
>>> locale.setlocale(locale.LC_ALL, '')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.6/locale.py", line 513, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
WHen I run...
$ locale
The ouput is...
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
...
I have been trying many suggestions but none of them solved my issue yet.
For example:
Does anyone has a good suggestion to solve my issue. Remembering that I'm using RHEL and not Ubuntu (there are many tutorials about locale issues and Ubuntu).
Add this to your /etc/environment
:
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
Then logout and login to shell again and try executing your commands.