Bug 1044453 - [abrt] glib2-devel: gtester-report:244:handle_info:KeyError: 'package'
Summary: [abrt] glib2-devel: gtester-report:244:handle_info:KeyError: 'package'
Alias: None
Product: Fedora
Classification: Fedora
Component: glib2
Version: 19
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:f29dafbd6ac9969db224693a24f...
Depends On:
TreeView+ depends on / blocked
Reported: 2013-12-18 10:51 UTC by Iago Rubio
Modified: 2015-02-17 19:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-02-17 19:42:15 UTC
Type: ---

Attachments (Terms of Use)
File: backtrace (591 bytes, text/plain)
2013-12-18 10:51 UTC, Iago Rubio
no flags Details
File: environ (3.04 KB, text/plain)
2013-12-18 10:51 UTC, Iago Rubio
no flags Details
File: Screencast from 18-12-13 11:46:14.webm (365.84 KB, application/octet-stream)
2013-12-18 10:51 UTC, Iago Rubio
no flags Details
File: triggerbug.tar.gz (3.42 KB, application/octet-stream)
2013-12-18 10:51 UTC, Iago Rubio
no flags Details
Proposed patch to add default values to the missing fields in the XML report (677 bytes, patch)
2013-12-18 11:26 UTC, Iago Rubio
no flags Details | Diff

System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 668035 0 None None None Never

Description Iago Rubio 2013-12-18 10:51:37 UTC
Description of problem:
gtester-report raised a exception after trying to parse a simple test results file generated by a simple glib test.

Version-Release number of selected component:

Additional info:
reporter:       libreport-2.1.10
cmdline:        /usr/bin/python /bin/gtester-report testresults.xml
executable:     /bin/gtester-report
kernel:         3.11.10-200.fc19.x86_64
runlevel:       N 3
type:           Python
uid:            1000

Truncated backtrace:
gtester-report:244:handle_info:KeyError: 'package'

Traceback (most recent call last):
  File "/bin/gtester-report", line 492, in <module>
  File "/bin/gtester-report", line 486, in main
    HTMLReportWriter(rr.get_info(), rr.binary_list()).printout()
  File "/bin/gtester-report", line 350, in printout
    self.handle_info ()
  File "/bin/gtester-report", line 244, in handle_info
    self.oprint ('<h3>Package: %(package)s, version: %(version)s</h3>\n' % self.info)
KeyError: 'package'

Local variables in innermost frame:
self: <__main__.HTMLReportWriter object at 0x1485890>

Potential duplicate: bug 712731

Comment 1 Iago Rubio 2013-12-18 10:51:42 UTC
Created attachment 838233 [details]
File: backtrace

Comment 2 Iago Rubio 2013-12-18 10:51:45 UTC
Created attachment 838234 [details]
File: environ

Comment 3 Iago Rubio 2013-12-18 10:51:49 UTC
Created attachment 838235 [details]
File: Screencast from 18-12-13 11:46:14.webm

Comment 4 Iago Rubio 2013-12-18 10:51:52 UTC
Created attachment 838236 [details]
File: triggerbug.tar.gz

Comment 5 Iago Rubio 2013-12-18 11:26:50 UTC
Created attachment 838264 [details]
Proposed patch to add default values to the missing fields in the XML report

gtester-report expect the fields "package", "version" and "revision" to exist in the XML file generated by gtester, but simple tests don't provide those fields to gtester and are missing in the generated XML file.

This causes an exception when running gtester-report with the generated XML file without those fields.

This patch adds a default value "unknown" to the package and version fields if they don't exists and avoids the revision line in the report if a revision don't exists in the XML.

Comment 6 Iago Rubio 2013-12-18 11:40:27 UTC
Comment on attachment 838236 [details]
File: triggerbug.tar.gz

Simple test case to reproduce the bug.

Comment 7 Iago Rubio 2013-12-19 09:32:43 UTC
Same bug confirmed in Fedora 20.

Same patch applies.

Looks like people are tweaking their makefiles to workaround this issue like in this chromium patch: http://git.chromium.org/gitweb/?p=chromiumos/third_party/libmbim.git;a=blobdiff;f=gtester.make;fp=gtester.make;h=40348dcd1dfc544c1bf4bcd89abba3f03fec4f0e;hp=0000000000000000000000000000000000000000;hb=d20e41ca6a90e335b89b7fcc386426f8d21ed259;hpb=a0a8d96d1b7c7db968ddb07216f0d8c6de12f1be

This issue can be fixed also by adding to the report file below <gtester> tag the <info> tag containing the package, version and revision:


Or by creating a script to put all the test files together on a report collection with the format:

<?xml version="1.0"?>
 (content of individual tests here)

A example script could be:


# variables change your settings here

# script
FILES=`find $REPORT_DIR -name "*.xml"`

cat > $FNAME << EOF
<?xml version="1.0"?>

for f in $FILES; do cat $f | sed -e "1,1s/^<?xml\b[^>?]*?>//" >> $FNAME;done;

echo "</report-collection>" >> $FNAME;

gtester-report $FNAME

Comment 8 Philip Withnall 2014-08-19 07:36:48 UTC
Another user experienced a similar problem:

Don’t know, sorry.

reporter:       libreport-2.2.2
cmdline:        /usr/bin/python /usr/bin/gtester-report test-report.xml
executable:     /usr/bin/gtester-report
kernel:         3.14.15-100.fc19.x86_64
package:        glib2-devel-2.36.4-1.fc19
reason:         gtester-report:244:handle_info:KeyError: 'package'
runlevel:       N 5
type:           Python
uid:            1000

Comment 9 Fedora End Of Life 2015-01-09 20:53:56 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Fedora End Of Life 2015-02-17 19:42:15 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.