Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I opened it in the terminal and got the following error:

2013-09-26 12:12:44,585 - - INFO - setting up proxy 'None'
2013-09-26 12:12:44,589 - softwarecenter.db.database - INFO - open() database: path=None use_axi=True use_agent=True
2013-09-26 12:12:44,678 - - WARNING - Could not get usefulness from server, no username in config file
2013-09-26 12:12:44,738 - - INFO - show_available_packages: search_text is '', app is None.
2013-09-26 12:12:44,740 - softwarecenter.db.pkginfo_impl.aptcache - INFO -
Traceback (most recent call last):
  File "/usr/bin/software-center", line 176, in <module>
  File "/usr/share/software-center/softwarecenter/ui/gtk3/", line 1422, in run
  File "/usr/share/software-center/softwarecenter/ui/gtk3/", line 1352, in show_available_packages
  File "/usr/share/software-center/softwarecenter/ui/gtk3/session/", line 154, in set_active_view
  File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/", line 171, in init_view
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/", line 238, in __init__
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/", line 511, in build
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/", line 257, in _build_homepage_view
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/", line 372, in _append_banner_ads
  File "/usr/share/software-center/softwarecenter/backend/", line 119, in query_exhibits
    lang=get_language(), series=self.distro.get_codename())
  File "/usr/share/software-center/softwarecenter/distro/", line 92, in get_codename
    self._distro_code_name = distro_info['CODENAME']
KeyError: 'CODENAME'

Does anyone have an idea about how to approach this? Thanks

share|improve this question

Try uninstalling and reinstall software center.

To uninstall Software Center:

sudo apt-get remove software-center

sudo apt-get autoremove software-center

To re-install Software Center:

sudo apt-get update

sudo apt-get install software-center
share|improve this answer
Nope. Still getting the same error. – Haronious Sep 26 '13 at 19:43
Try doing this: cd ~/.cache; rm -r software-center --Then-- unity --reset & (There is no dash after the &, noticed it when I added the comment it was pointing to my name :P ) – RedHatcc Sep 26 '13 at 20:21

Work for me

$ diff -u /usr/share/software-center/softwarecenter/distro/ /usr/share/software-center/softwarecenter/distro/
--- /usr/share/software-center/softwarecenter/distro/   2014-02-02 01:03:59.812302279 -0300
+++ /usr/share/software-center/softwarecenter/distro/    2014-02-02 01:04:34.603927639 -0300
@@ -85,10 +85,8 @@
             return distrocode
         # normal behavior
         if not hasattr(self, "_distro_code_name"):
-            try:
-                distro_info = lsb_release.get_distro_information(True)
-            except:
-                distro_info = lsb_release.get_distro_information()
+            # lsb_release.get_distro_information(True) returns OS key instead of CODENAME
+            distro_info = lsb_release.get_distro_information()
             self._distro_code_name = distro_info['CODENAME']
         return self._distro_code_name

share|improve this answer
works for me too – Lawand Oct 1 '14 at 22:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.