Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 981176 - product has no key "components"
Summary: product has no key "components"
Alias: None
Product: Fedora
Classification: Fedora
Component: python-bugzilla
Version: 19
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Will Woods
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2013-07-04 08:09 UTC by Lubos Kocman
Modified: 2013-07-09 22:58 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-07-09 22:58:56 UTC

Attachments (Terms of Use)

Description Lubos Kocman 2013-07-04 08:09:01 UTC
Description of problem:

  File "/usr/lib/python2.7/site-packages/bugzilla/", line 693, in _getcomponentsdetails
    comps = p["components"]
KeyError: 'components'

Version-Release number of selected component (if applicable):

used against

How reproducible:

Steps to Reproduce:
1. session.getcomponentsdetails(product="Red Hat Developer Toolset") #in my case

Actual results:

  File "/usr/lib/python2.7/site-packages/bugzilla/", line 553, in getcomponentsdetails
    clist = self._getcomponentsdetails(product)
  File "/usr/lib/python2.7/site-packages/bugzilla/", line 693, in _getcomponentsdetails
    comps = p["components"]
KeyError: 'components'

the dict actually contains only ("id", "name") keys. The Comment in code says that features should be supported since bugzilla 4.2 (rhbz is 4.4)

Expected results:

Additional info:

Comment 1 Lubos Kocman 2013-07-04 09:20:53 UTC

I've realized that I have to refresh data manually in order to access them:

session.refresh_products(names=[product,], include_fields=["name", "id", "components",])  

Probably notabug, but I believe it's worth some better exception handling or force refreshing requested data.

I'll leave it up2 you.


Comment 2 Cole Robinson 2013-07-09 22:58:56 UTC
Thanks for the report Lubos. I agree we should try a refresh here, I pushed this:

commit 7e268315db8fefc9723e2fdc903e5f6b13268be2
Author: Cole Robinson <>
Date:   Tue Jul 9 18:57:04 2013 -0400

    base: getcomponentsdetails: Try a refresh if data isn't cached

Just closing this since it's a minor issue that isn't worth doing an explicit backport/build/update for.

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