ValueError: unknown locale: sr_RS -> Python programs (including software-center) will not start with locale variable (LANG environment variable) set to sr_RS or sr_RS@latin in Ubuntu 10.10

Asked by Ђорђе Васиљевић on 2010-10-24


When I try to start the program, it says "Loading Ubuntu Software Center" and then just disappears. I have never managed to make it work, so I had to use Synaptic Package Manager all of the time. I could not use .deb files at all.

Can anyone tell me how can I fix this?

Question information

English Edit question
Ubuntu software-center Edit question
No assignee Edit question
Last query:
Last reply:

can you give the output of:

sudo apt-get update; sudo apt-get -y dist-upgrade


Нашао сам: maverick Release.gpg
Нашао сам: maverick Release.gpg
Прескачем: maverick/main Translation-en
Нашао сам: maverick-security Release.gpg
Прескачем: maverick-security/main Translation-en
Нашао сам: maverick Release.gpg
Прескачем: maverick/main Translation-en
Прескачем: maverick/main Translation-sr
Прескачем: maverick/main Translation-en
Прескачем: maverick-security/main Translation-sr
Прескачем: maverick-security/multiverse Translation-en
Прескачем: maverick-security/multiverse Translation-sr
Прескачем: maverick-security/restricted Translation-en
Прескачем: maverick-security/restricted Translation-sr
Прескачем: maverick-security/universe Translation-en
Прескачем: maverick-security/universe Translation-sr
Прескачем: maverick/main Translation-sr
Нашао сам: maverick Release
Нашао сам: maverick-security Release
Нашао сам: maverick Release
Нашао сам: maverick/main Translation-sr
Прескачем: maverick/multiverse Translation-en
Нашао сам: maverick-security/main Sources
Нашао сам: maverick/main Sources
Нашао сам: maverick/main Sources
Нашао сам: maverick-security/restricted Sources
Нашао сам: maverick-security/universe Sources
Нашао сам: maverick-security/multiverse Sources
Нашао сам: maverick-security/main i386 Packages
Нашао сам: maverick-security/restricted i386 Packages
Нашао сам: maverick/main i386 Packages
Нашао сам: maverick/main i386 Packages
Прескачем: maverick/multiverse Translation-sr
Нашао сам: maverick-security/universe i386 Packages
Нашао сам: maverick-security/multiverse i386 Packages
Прескачем: maverick/restricted Translation-en
Прескачем: maverick/restricted Translation-sr
Прескачем: maverick/universe Translation-en
Прескачем: maverick/universe Translation-sr
Нашао сам: maverick-updates Release.gpg
Прескачем: maverick-updates/main Translation-en
Прескачем: maverick-updates/main Translation-sr
Прескачем: maverick-updates/multiverse Translation-en
Прескачем: maverick-updates/multiverse Translation-sr
Прескачем: maverick-updates/restricted Translation-en
Прескачем: maverick-updates/restricted Translation-sr
Прескачем: maverick-updates/universe Translation-en
Прескачем: maverick-updates/universe Translation-sr
Нашао сам: maverick Release
Нашао сам: maverick-updates Release
Нашао сам: maverick/main Sources
Нашао сам: maverick/restricted Sources
Нашао сам: maverick/universe Sources
Нашао сам: maverick/multiverse Sources
Нашао сам: maverick/main i386 Packages
Нашао сам: maverick/restricted i386 Packages
Нашао сам: maverick/universe i386 Packages
Нашао сам: maverick/multiverse i386 Packages
Нашао сам: maverick-updates/main Sources
Нашао сам: maverick-updates/restricted Sources
Нашао сам: maverick-updates/universe Sources
Нашао сам: maverick-updates/multiverse Sources
Нашао сам: maverick-updates/main i386 Packages
Нашао сам: maverick-updates/restricted i386 Packages
Нашао сам: maverick-updates/universe i386 Packages
Нашао сам: maverick-updates/multiverse i386 Packages
Читам спискове пакета... Урађено

Читам спискове пакета... Урађено
Правим дрво међузависности
Читам информацију стања... Урађено
Правим списак пакета за ажурирање... Урађено
0 ажурираних, 0 новоинсталираних, 0 за уклањање и 0 који неће бити ажурирани.

Sorry, it is not in English. I hope you will find a problem.

Ok looks like a clean update with no necessary updates judging by the pattern.

Can you run:

gksudo software-center

If you get any weird outputs, paste them here as an update


    app = SoftwareCenterApp(datadir, xapian_base_path, options, args)
  File "/usr/share/software-center/softwarecenter/", line 149, in __init__
    self.history = get_apt_history()
  File "/usr/share/software-center/softwarecenter/apt/", line 178, in get_apt_history
    apt_history = AptHistory()
  File "/usr/share/software-center/softwarecenter/apt/", line 83, in __init__
  File "/usr/share/software-center/softwarecenter/apt/", line 99, in rescan
  File "/usr/share/software-center/softwarecenter/apt/", line 116, in _scan
    trans = Transaction(stanza)
  File "/usr/share/software-center/softwarecenter/apt/", line 59, in __init__
    "%Y-%m-%d %H:%M:%S")
  File "/usr/lib/python2.6/", line 270, in <module>
    _TimeRE_cache = TimeRE()
  File "/usr/lib/python2.6/", line 188, in __init__
    self.locale_time = LocaleTime()
  File "/usr/lib/python2.6/", line 70, in __init__
    self.lang = _getlang()
  File "/usr/lib/python2.6/", line 29, in _getlang
    return locale.getlocale(locale.LC_TIME)
  File "/usr/lib/python2.6/", line 497, in getlocale
    return _parse_localename(localename)
  File "/usr/lib/python2.6/", line 410, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: sr_RS

I'd log a bug. In the mean time you can use:

apt-cache search something
to find apps

sudo apt-get install packagename
to install packages

sudo apt-get remove packagename
to remove packages

Thank you! I hope this will get fixed soon.

I believe that your PC is experiencing the following bugs, for which there is no permanent solution yet:

As a workaround procedure, I think that you need to set the LANG environment variable to something else (for example: en_US)

The following document gives more information on how and where to set the LANG environment variable in Ubuntu:

Can you help with this problem?

Provide an answer of your own, or ask Ђорђе Васиљевић for more information if necessary.

To post a message you must log in.