package_resource crashed with KeyError in get_packages()

Bug #794747 reported by Michael Rodríguez-Torrent
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
checkbox (Ubuntu)
Fix Released
Low
Daniel Manrique

Bug Description

Binary package hint: checkbox

System Testing reports a crash after "gathering information."

$ lsb_release -rd
Description: Ubuntu 10.10
Release: 10.10

$ apt-cache policy checkbox
checkbox:
  Installed: 0.10.3
  Candidate: 0.10.3
  Version table:
 *** 0.10.3 0
        500 http://ubuntu.datahop.net/ubuntu/ maverick/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Crash
DistroRelease: Ubuntu 10.10
Package: checkbox 0.10.3
ProcVersionSignature: Ubuntu 2.6.35-29.51-generic 2.6.35.12
Uname: Linux 2.6.35-29-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Wed Jun 8 21:19:24 2011
EcryptfsInUse: Yes
ExecutablePath: /usr/share/checkbox/scripts/package_resource
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
InterpreterPath: /usr/bin/python2.6
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/share/checkbox/scripts/package_resource
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, user)
 LANG=en_NZ.utf8
 LC_MESSAGES=en_GB.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/share/checkbox/scripts/package_resource']
SourcePackage: checkbox
Title: package_resource crashed with KeyError in get_packages()
UserGroups: adm admin cdrom dialout dip fax floppy fuse lpadmin plugdev sambashare tape video

Related branches

Revision history for this message
Michael Rodríguez-Torrent (mrtorrent) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Daniel Manrique (roadmr) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Is this problem still occurring?

If so, could you please open a terminal and run this command:

/usr/share/checkbox/scripts/package_resource > /tmp/packages.txt

Please attach both the generated /tmp/packages.txt file and any output you get in the terminal, such as error messages.

Thanks!

Changed in checkbox (Ubuntu):
status: New → Incomplete
Revision history for this message
Michael Rodríguez-Torrent (mrtorrent) wrote :

Hi Daniel, it is still occurring.

Packages.txt attached. Exception trace from terminal:

Traceback (most recent call last):
  File "/usr/share/checkbox/scripts/package_resource", line 119, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/share/checkbox/scripts/package_resource", line 108, in main
    for package in packages:
  File "/usr/share/checkbox/scripts/package_resource", line 87, in get_packages
    name = package["name"]
KeyError: 'name'

Revision history for this message
Daniel Manrique (roadmr) wrote :

Thanks so much for the quick reply!

I see the "lexmark-08z-series-driver" package appears with two names, so the package_resource script seems to be getting confused by that particular package.

Could you please attach the output of the following command, run in a terminal? This will generate a list of all the packages in your system, same as used by package_resource. With this I can see what is confusing the parser in package_resource and hopefully get it fixed.

COLUMNS=200 dpkg -l

Thanks in advance!

---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

visibility: private → public
Revision history for this message
Michael Rodríguez-Torrent (mrtorrent) wrote :

Hi Daniel, sorry for the slow response this time! Package list attached. As you can see, the formatting of that Lexmark package's description is very strange compared to the rest, i.e. it spans more than one line

Revision history for this message
Daniel Manrique (roadmr) wrote :

Thanks Michael,

Yes, I think the "Description" field in the package's information for lexmark-08z-series-driver is malformatted and is causing the display to be weird, which is indeed throwing off checkbox's package parser.

I'll mark the bug as Triaged as we now have the output that causes the parser to error out, and we'd be able to handle this on checkbox's side. Importance: Low as it affects an "unusual configuration" (it's the first and only report of this kind we have).

I'm curious, though, on the source of this package, where did you get it? I'd appreciate if you could point me to the source, also it would be interesting to have the output of this command:

apt-cache show lexmark-08z-series-driver

This is to determine what is wrong with that package and perhaps inform its maintainers that their control file is malformatted.

Thanks!

Changed in checkbox (Ubuntu):
status: Incomplete → Triaged
importance: Undecided → Low
Revision history for this message
Michael Rodríguez-Torrent (mrtorrent) wrote : Re: [Bug 794747] Re: package_resource crashed with KeyError in get_packages()

Interesting result:

N: Unable to locate package lexmark-08z-series-driver
E: No packages found

The package came direct from the Lexmark site, I believe, possibly
here:
http://support.lexmark.com/index?page=content&id=DR20523&locale=EN&userlocale=EN_US

On Thu 22 Sep 2011 01:05:35 BST, Daniel Manrique wrote:
> Thanks Michael,
>
> Yes, I think the "Description" field in the package's information for
> lexmark-08z-series-driver is malformatted and is causing the display to
> be weird, which is indeed throwing off checkbox's package parser.
>
> I'll mark the bug as Triaged as we now have the output that causes the
> parser to error out, and we'd be able to handle this on checkbox's side.
> Importance: Low as it affects an "unusual configuration" (it's the first
> and only report of this kind we have).
>
> I'm curious, though, on the source of this package, where did you get
> it? I'd appreciate if you could point me to the source, also it would be
> interesting to have the output of this command:
>
> apt-cache show lexmark-08z-series-driver
>
> This is to determine what is wrong with that package and perhaps inform
> its maintainers that their control file is malformatted.
>
> Thanks!
>
> ** Changed in: checkbox (Ubuntu)
> Status: Incomplete => Triaged
>
> ** Changed in: checkbox (Ubuntu)
> Importance: Undecided => Low
>

Daniel Manrique (roadmr)
Changed in checkbox (Ubuntu):
assignee: nobody → Daniel Manrique (roadmr)
status: Triaged → In Progress
Daniel Manrique (roadmr)
Changed in checkbox (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package checkbox - 0.13

---------------
checkbox (0.13) precise; urgency=low

  New upstream release (LP: #892268):

  [Marc Tardif]
  * Generate a submission.xml file that contains all device and attachment
  * Write the report before reporting the validation error.
  * Changed device.product to dmi.product for the formfactor (LP: #875312)

  [Daniel Manrique]
  * Use gettext for string (LP: #869267)
  * Move progress indicator to main checkbox dialog instead of a
    transient window (LP: #868995)
  * Ignore malformed dpkg entries in package_resource (LP: #794747)
  * Reset window title after finishing a manual test (LP: #874690)
  * Handle "@" in locale names (as in ca@valencia).

  [Jeff Lane]
  * Went through all the job files and:
    * Updated descriptions to match Unity UI structure
    * Added descriptions where necessary
    * Added further details to some descriptions
    * Moved some jobs to more appropriate files
    * Fixed job names in older job files to match new naming scheme
      (suite/testname)
    * Added jobs to local.txt to ensure all job files are now parsed
      (this allows easier addition of existing tests to whitelists)
    * Changed remaining manual job descriptions to match the new format
  * Updated CD and DVD write tests to be more clear about when to skip
    them (LP: #772794)

  [Ara Pulido]
  * Rewrote all job descriptions to match OEM QA syntax

  [Brendan Donegan]
  * Fix the code that assigns keys in checkbox-cli so that it never assigns
    keys which have other uses. (LP: #877467)
  * Show details of unmet job requirements (LP: #855852)
  * Ensure that connect_wireless chooses a wireless connection from the list
    of available connections (LP: #877752)
  * Have the bluetooth/detect tests require a device with the category
    BLUETOOTH to run, thus preventing the test from failing on systems with
    no Bluetooth device (LP: #862322)
  * Rename attachment jobs to not have a forward slash in their name
    (LP: #887964)
  * Guard against trying to write files to logical partitions on USB sticks
    (which will obviously fail) in usb_test (LP: #887049)
  * Make the OpenGL test ignore the return value of glxgears and improve
    the test description (LP: #890725)
  * Allow input/mouse test to run if a TOUCH device is present
    (LP: #886129)

  [ Javier Collado ]
  * Broken job dependencies fixed (LP: #888447)
  * Regex support when specifying blacklists and whitelists on the
    commandline (LP: #588647)
 -- Daniel Manrique <email address hidden> Thu, 18 Nov 2011 12:46:21 -0500

Changed in checkbox (Ubuntu):
status: Fix Committed → Fix Released
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.