[UIFe] software-properties-gtk crashed with KeyError in show_drivers(): 'model'

Bug #1028388 reported by Jimmy Frydkær Jensen
334
This bug affects 62 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Fix Released
High
Mathieu Trudel-Lapierre
Quantal
Fix Released
High
Mathieu Trudel-Lapierre

Bug Description

Software update crashed duering attempt to reach settings for software update

ProblemType: Crash
DistroRelease: Ubuntu 12.10
Package: software-properties-gtk 0.91
ProcVersionSignature: Ubuntu 3.5.0-6.6-generic 3.5.0
Uname: Linux 3.5.0-6-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.4-0ubuntu5
Architecture: amd64
CrashCounter: 1
Date: Tue Jul 24 13:13:53 2012
ExecutablePath: /usr/bin/software-properties-gtk
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
InterpreterPath: /usr/bin/python3.2mu
PackageArchitecture: all
ProcCmdline: /usr/bin/python3.2 /usr/bin/software-properties-gtk --open-tab 2
ProcEnviron:
 PATH=(custom, no user)
 LANG=da_DK.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/bin/software-properties-gtk', '--open-tab', '2']
SourcePackage: software-properties
Title: software-properties-gtk crashed with KeyError in show_drivers(): 'model'
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo vboxusers

Revision history for this message
Jimmy Frydkær Jensen (jimmyfj) wrote :
tags: removed: need-duplicate-check
Changed in software-properties (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in software-properties (Ubuntu):
status: New → Confirmed
visibility: private → public
Changed in software-properties (Ubuntu):
importance: Medium → High
Revision history for this message
Ron Mitchell (rm2892) wrote :

Also affects Lubuntu PPC 12.10 and i386 12.10 when running Software Update

Revision history for this message
Sasa Paporovic (melchiaros) wrote :

The same when I try to reach software-sources over the Software-Center.

Software-Center -> menu -> edit -> Software-Sources ...

On clicking on this option software-sources crashed on start attemped without any visual window come up.

Revision history for this message
Sasa Paporovic (melchiaros) wrote :

This is the same crasher as the other affected reached it over software-properties in update-manager.

Revision history for this message
Greg Faith (gregfaith) wrote :

Same bug Xubuntu quantal-desktop-amd64 20120802 build

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1028388

tags: added: iso-testing
Revision history for this message
Ron Mitchell (rm2892) wrote :

also happens with Lubuntu AMD64+Mac 2012-08-11 build.

Occurs on startup.

Revision history for this message
Elfy (elfy) wrote :

Same on upgraded alpha3 ARM

Revision history for this message
garybrlow (garybrlow) wrote :

Bug happens on Xubuntu 12.10 32bit
Version 3.5.0-13-generic #13-Ubuntu SMP Mon Aug 27 21:32:34 UTC 2012 i686 athlon i686 GNU/Linux
occurs on start-up.

Revision history for this message
Tim Lunn (darkxst) wrote :

This appears to happen when a device is missing either 'vendor' or 'model' properties

Revision history for this message
Jessica Lambiase (siliconjey) wrote :

Same error on Ubuntu 12.10 32bit

Version 3.5.0-13-generic #14-Ubuntu SMP Wed Aug 29 16:47:23 UTC 2012 i686 i686 i686 GNU/Linux

Package version:
software-properties-gtk:
  Installato: 0.92.1
  Candidato: 0.92.1
  Tabella versione:
 *** 0.92.1 0
        500 http://it.archive.ubuntu.com/ubuntu/ quantal/main i386 Packages
        100 /var/lib/dpkg/status

Trying to recall Software Sources from USC, gnome-terminal and dash: same error occured.

tags: added: running-unity
Revision history for this message
Chris Hermansen (c-hermansen) wrote :

I am trying to use this replacement for Jockey to see if there are any wifi drivers that will work with my Broadcom 4311.

A very serious problem; any suggestions for a workaround?

Revision history for this message
Shahar Or (mightyiam) wrote :

Chris, try jokey-text in command-line.

Revision history for this message
Brian Murray (brian-murray) wrote :

Could somebody from the desktop team look at this since they added in the driver's tab?

Changed in software-properties (Ubuntu Quantal):
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

Same here.

Fresh Beta1 install.

  When launching Software Sources from the Unity Dash, I get nothing, no
  error message.

  When trying to launch it from the CLI, I get this:

  $ software-properties-gtk
  gpg: /tmp/tmpzr2tyb/trustdb.gpg: trustdb created
  Traceback (most recent call last):
    File "/usr/bin/software-properties-gtk", line 103, in <module>
      app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
    File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 179, in __init__
      self.show_drivers()
    File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 1268, in show_drivers
      widget = Gtk.Label("{}: {}".format(self.devices[device]['vendor'], self.devices[device]['model']))
  KeyError: 'model'

Revision history for this message
Manish-Raj (twas6263) wrote :

I got the following output when ran via terminal :

manish-raj@manishraj-Inspiron-1012:~$ software-properties-gtk
Fontconfig warning: "/etc/fonts/conf.d/69-language-selector-ja-jp.conf", line 141: Having multiple values in <test> isn't supported and may not works as expected
Fontconfig warning: "/etc/fonts/conf.d/69-language-selector-zh-tw.conf", line 79: Having multiple values in <test> isn't supported and may not works as expected
Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 9: Having multiple values in <test> isn't supported and may not works as expected
Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 22: Having multiple <family> in <alias> isn't supported and may not works as expected
Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 22: Having multiple <family> in <alias> isn't supported and may not works as expected
Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 22: Having multiple <family> in <alias> isn't supported and may not works as expected
Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 26: Having multiple <family> in <alias> isn't supported and may not works as expected
Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 31: Having multiple values in <test> isn't supported and may not works as expected
Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 40: Having multiple values in <test> isn't supported and may not works as expected
gpg: /tmp/tmpfvvl2k/trustdb.gpg: trustdb created
Traceback (most recent call last):
  File "/usr/bin/software-properties-gtk", line 103, in <module>
    app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 179, in __init__
    self.show_drivers()
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 1268, in show_drivers
    widget = Gtk.Label("{}: {}".format(self.devices[device]['vendor'], self.devices[device]['model']))
KeyError: 'vendor'

Additional information :

manish-raj@manishraj-Inspiron-1012:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu quantal (development branch)
Release: 12.10
Codename: quantal

manish-raj@manishraj-Inspiron-1012:~$ uname -a
Linux manishraj-Inspiron-1012 3.5.0-13-generic #14-Ubuntu SMP Wed Aug 29 16:47:23 UTC 2012 i686 i686 i686 GNU/Linux

Revision history for this message
Manish-Raj (twas6263) wrote :

software-properties-gtk no longer crashes on my system and I am able to launch it successfully from all places i.e. Ubuntu Software Center, Synaptic Package Manager as well as via terminal . I think the last update i.e. version 0.92.2 did the trick for me.

manish-raj@manishraj-Inspiron-1012:~$ apt-cache policy software-properties-gtk
software-properties-gtk:
  Installed: 0.92.2
  Candidate: 0.92.2
  Version table:
 *** 0.92.2 0
        500 http://archive.ubuntu.com/ubuntu/ quantal/main i386 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Alex (alex.b) wrote :

I'm afraid this is still happening for me and I am unable to launch this at all on a fresh install of Quantal beta 1 (with all updates applied).

software-properties-gtk:
  Installed: 0.92.3
  Candidate: 0.92.3

Revision history for this message
Pikkolo (pikkolo) wrote :

12.10 current, still happens

Revision history for this message
Rainer Rohde (rainer-rohde) wrote :

Confirmed; still happens here as well.

Changed in software-properties (Ubuntu Quantal):
assignee: Canonical Desktop Team (canonical-desktop-team) → Mathieu Trudel-Lapierre (mathieu-tl)
status: Confirmed → In Progress
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

This would be my proposed fix so far:

--- softwareproperties/gtk/SoftwarePropertiesGtk.py 2012-08-28 13:29:24 +0000
+++ softwareproperties/gtk/SoftwarePropertiesGtk.py 2012-09-10 16:10:18 +0000
@@ -1265,7 +1265,7 @@
       device_detail = Gtk.Box(spacing=6, orientation=Gtk.Orientation.VERTICAL)
       device_box.pack_start(device_detail, True, True, 0)

- widget = Gtk.Label("{}: {}".format(self.devices[device]['vendor'], self.devices[device]['model']))
+ widget = Gtk.Label("{}: {}".format(self.devices[device].get('vendor', _('Unknown')), self.devices[device].get('model', _('Unknown'))))
       widget.set_halign(Gtk.Align.START)
       device_detail.pack_start(widget, True, False, 0)
       widget = Gtk.Label("<small>{}</small>".format(overall_status))

Replacing the missing strings when the dictionary keys are unavailable with "Unknown", which introduces a new string and thus should need an UI freeze exception.

summary: - software-properties-gtk crashed with KeyError in show_drivers(): 'model'
+ [UIFe] software-properties-gtk crashed with KeyError in show_drivers():
+ 'model'
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :
Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

i don't think this is the same but just might may be related: error in software-properties a la apt-add-repository
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1048733

Revision history for this message
Stéphane Graber (stgraber) wrote :

+1 from the release team, the fix looks reasonable and the use of "Unknown" won't actually cause any UI change as these would currently crash. Go ahead with the upload once cleared with translations and doc.

Changed in software-properties (Ubuntu Quantal):
status: In Progress → Triaged
Revision history for this message
David Planella (dpm) wrote :

+1 from the translations team.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties - 0.92.4

---------------
software-properties (0.92.4) quantal; urgency=low

  * softwareproperties/gtk/SoftwarePropertiesGtk.py: also cover the cases where
    vendor or model can't be identified; replace those unavailable strings with
    "Unknown". (LP: #1028388)
 -- Mathieu Trudel-Lapierre <email address hidden> Tue, 11 Sep 2012 08:26:25 -0400

Changed in software-properties (Ubuntu Quantal):
status: Triaged → Fix Released
Revision history for this message
Alex (alex.b) wrote :

I can confirm that this patch has fixed the problem for me.

I've attached a screenshot of how the new "Unknown" strings actually look, in case this helps anyone.

Thanks for your quick work!

Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

1048743 was marked as a dupe. if this fix truly is a fix, then, 1048743 is not a dupe as i have the updated package and problem persists, both with add-apt-repository and synaptic.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Thanks Walter; I marked it as not a duplicate.

Alex; thanks for confirming it works :)

Revision history for this message
Wendell Joyner (joynerww) wrote :
Download full text (3.6 KiB)

I'm experiencing this problem with the released version of 12.10:

root@Rampage-Formula:/etc/apt# software-properties-gtk
Fontconfig warning: "/etc/fonts/conf.d/65-culmus.conf", line 12: Having multiple values in <test> isn't supported and may not works as expected
Fontconfig warning: "/etc/fonts/conf.d/65-culmus.conf", line 34: Having multiple values in <test> isn't supported and may not works as expected
Fontconfig warning: "/etc/fonts/conf.d/65-culmus.conf", line 44: Having multiple values in <test> isn't supported and may not works as expected
Fontconfig warning: "/etc/fonts/conf.d/65-culmus.conf", line 55: Having multiple values in <test> isn't supported and may not works as expected
Fontconfig warning: "/etc/fonts/conf.d/65-culmus.conf", line 66: Having multiple values in <test> isn't supported and may not works as expected
Fontconfig warning: "/etc/fonts/conf.d/65-culmus.conf", line 77: Having multiple values in <test> isn't supported and may not works as expected
Fontconfig warning: "/etc/fonts/conf.d/65-culmus.conf", line 89: Having multiple values in <test> isn't supported and may not works as expected
Fontconfig warning: "/etc/fonts/conf.d/65-culmus.conf", line 101: Having multiple values in <test> isn't supported and may not works as expected
Fontconfig warning: "/etc/fonts/conf.d/65-culmus.conf", line 111: Having multiple values in <test> isn't supported and may not works as expected
Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum-coding.conf", line 10: Having multiple values in <test> isn't supported and may not works as expected
Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum-coding.conf", line 22: Having multiple values in <test> isn't supported and may not works as expected
gpg: /tmp/tmpg86ud9/trustdb.gpg: trustdb created
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 162, in packages_for_modalias
    cache_map = packages_for_modalias.cache_maps[apt_cache_hash]
KeyError: -1062573500

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/software-properties-gtk", line 103, in <module>
    app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 178, in __init__
    self.init_drivers()
  File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 1097, in init_drivers
    self.devices = detect.system_device_drivers()
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 415, in system_device_drivers
    for pkg, pkginfo in system_driver_packages(apt_cache).items():
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 319, in system_driver_packages
    for p in packages_for_modalias(apt_cache, alias):
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 164, in packages_for_modalias
    cache_map = _apt_cache_modalias_map(apt_cache)
  File "/usr/lib/python3/dist-packages/UbuntuDrivers/detect.py", line 129, in _apt_cache_modalias_map
    m = package.candidate.record['Modaliases']
  File "/usr/lib/...

Read more...

Revision history for this message
Wendell Joyner (joynerww) wrote :

I should add that it worked fine under 12.04LTS. This started happening after upgrading to 12.10.

Revision history for this message
Dietmar Winkler (dietmarw) wrote :

Although it says there was a fix released it occurred again last week. See also log attached

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.