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

Hello,

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

Language:
English Edit question
Status:
Answered
For:
Ubuntu software-center Edit question
Assignee:
No assignee Edit question
Last query:
2010-10-24
Last reply:
2010-10-25

can you give the output of:

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

Thanks

Нашао сам: http://rs.archive.ubuntu.com maverick Release.gpg
Нашао сам: http://extras.ubuntu.com maverick Release.gpg
Прескачем: http://extras.ubuntu.com/ubuntu/ maverick/main Translation-en
Нашао сам: http://security.ubuntu.com maverick-security Release.gpg
Прескачем: http://security.ubuntu.com/ubuntu/ maverick-security/main Translation-en
Нашао сам: http://ppa.launchpad.net maverick Release.gpg
Прескачем: http://ppa.launchpad.net/pcf/miro-releases/ubuntu/ maverick/main Translation-en
Прескачем: http://ppa.launchpad.net/pcf/miro-releases/ubuntu/ maverick/main Translation-sr
Прескачем: http://rs.archive.ubuntu.com/ubuntu/ maverick/main Translation-en
Прескачем: http://security.ubuntu.com/ubuntu/ maverick-security/main Translation-sr
Прескачем: http://security.ubuntu.com/ubuntu/ maverick-security/multiverse Translation-en
Прескачем: http://security.ubuntu.com/ubuntu/ maverick-security/multiverse Translation-sr
Прескачем: http://security.ubuntu.com/ubuntu/ maverick-security/restricted Translation-en
Прескачем: http://security.ubuntu.com/ubuntu/ maverick-security/restricted Translation-sr
Прескачем: http://security.ubuntu.com/ubuntu/ maverick-security/universe Translation-en
Прескачем: http://security.ubuntu.com/ubuntu/ maverick-security/universe Translation-sr
Прескачем: http://extras.ubuntu.com/ubuntu/ maverick/main Translation-sr
Нашао сам: http://extras.ubuntu.com maverick Release
Нашао сам: http://security.ubuntu.com maverick-security Release
Нашао сам: http://ppa.launchpad.net maverick Release
Нашао сам: http://rs.archive.ubuntu.com/ubuntu/ maverick/main Translation-sr
Прескачем: http://rs.archive.ubuntu.com/ubuntu/ maverick/multiverse Translation-en
Нашао сам: http://security.ubuntu.com maverick-security/main Sources
Нашао сам: http://extras.ubuntu.com maverick/main Sources
Нашао сам: http://ppa.launchpad.net maverick/main Sources
Нашао сам: http://security.ubuntu.com maverick-security/restricted Sources
Нашао сам: http://security.ubuntu.com maverick-security/universe Sources
Нашао сам: http://security.ubuntu.com maverick-security/multiverse Sources
Нашао сам: http://security.ubuntu.com maverick-security/main i386 Packages
Нашао сам: http://security.ubuntu.com maverick-security/restricted i386 Packages
Нашао сам: http://extras.ubuntu.com maverick/main i386 Packages
Нашао сам: http://ppa.launchpad.net maverick/main i386 Packages
Прескачем: http://rs.archive.ubuntu.com/ubuntu/ maverick/multiverse Translation-sr
Нашао сам: http://security.ubuntu.com maverick-security/universe i386 Packages
Нашао сам: http://security.ubuntu.com maverick-security/multiverse i386 Packages
Прескачем: http://rs.archive.ubuntu.com/ubuntu/ maverick/restricted Translation-en
Прескачем: http://rs.archive.ubuntu.com/ubuntu/ maverick/restricted Translation-sr
Прескачем: http://rs.archive.ubuntu.com/ubuntu/ maverick/universe Translation-en
Прескачем: http://rs.archive.ubuntu.com/ubuntu/ maverick/universe Translation-sr
Нашао сам: http://rs.archive.ubuntu.com maverick-updates Release.gpg
Прескачем: http://rs.archive.ubuntu.com/ubuntu/ maverick-updates/main Translation-en
Прескачем: http://rs.archive.ubuntu.com/ubuntu/ maverick-updates/main Translation-sr
Прескачем: http://rs.archive.ubuntu.com/ubuntu/ maverick-updates/multiverse Translation-en
Прескачем: http://rs.archive.ubuntu.com/ubuntu/ maverick-updates/multiverse Translation-sr
Прескачем: http://rs.archive.ubuntu.com/ubuntu/ maverick-updates/restricted Translation-en
Прескачем: http://rs.archive.ubuntu.com/ubuntu/ maverick-updates/restricted Translation-sr
Прескачем: http://rs.archive.ubuntu.com/ubuntu/ maverick-updates/universe Translation-en
Прескачем: http://rs.archive.ubuntu.com/ubuntu/ maverick-updates/universe Translation-sr
Нашао сам: http://rs.archive.ubuntu.com maverick Release
Нашао сам: http://rs.archive.ubuntu.com maverick-updates Release
Нашао сам: http://rs.archive.ubuntu.com maverick/main Sources
Нашао сам: http://rs.archive.ubuntu.com maverick/restricted Sources
Нашао сам: http://rs.archive.ubuntu.com maverick/universe Sources
Нашао сам: http://rs.archive.ubuntu.com maverick/multiverse Sources
Нашао сам: http://rs.archive.ubuntu.com maverick/main i386 Packages
Нашао сам: http://rs.archive.ubuntu.com maverick/restricted i386 Packages
Нашао сам: http://rs.archive.ubuntu.com maverick/universe i386 Packages
Нашао сам: http://rs.archive.ubuntu.com maverick/multiverse i386 Packages
Нашао сам: http://rs.archive.ubuntu.com maverick-updates/main Sources
Нашао сам: http://rs.archive.ubuntu.com maverick-updates/restricted Sources
Нашао сам: http://rs.archive.ubuntu.com maverick-updates/universe Sources
Нашао сам: http://rs.archive.ubuntu.com maverick-updates/multiverse Sources
Нашао сам: http://rs.archive.ubuntu.com maverick-updates/main i386 Packages
Нашао сам: http://rs.archive.ubuntu.com maverick-updates/restricted i386 Packages
Нашао сам: http://rs.archive.ubuntu.com maverick-updates/universe i386 Packages
Нашао сам: http://rs.archive.ubuntu.com 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

Thanks

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

https://bugs.launchpad.net/ubuntu/+source/python2.6/+bug/463654

https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/661956

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:

https://help.ubuntu.com/community/EnvironmentVariables

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.