#639: KeyError: 'product'
---------------------------+--------------------------
  Reporter:  jav           |      Owner:
      Type:  defect        |     Status:  review
  Priority:  critical      |  Milestone:  Release 8
 Component:  multiproduct  |    Version:  0.6.0
Resolution:                |   Keywords:  ticket field
---------------------------+--------------------------
Changes (by olemis):

 * status:  accepted => review
 * owner:  olemis =>
 * milestone:   => Release 8


Old description:

> ==== How to Reproduce ====
>
> While doing a GET operation on
> `/attachment/wiki/Topic1/Page1/Image1.png`, Trac issued an internal
> error.
>
> Clicking on an attachment link in a Wiki page results in an error
> message.
>
> Request parameters:
> {{{
> {'path': u'Topic1/Page1/Image1.png',
>  'realm': u'wiki'}
> }}}
>
> User agent: `Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101
> Firefox/23.0`
>
> ==== System Information ====
> || '''`Trac`''' || `1.0.1` [[br]] `` ||
> || '''`Babel`''' || `1.3` ||
> || '''`Bloodhound Trac`''' || `1.0.1` ||
> || '''`Genshi`''' || `0.7 (without speedups)` ||
> || '''`GIT`''' || `1.8.1.4` ||
> || '''`mod_wsgi`''' || `3.3 (WSGIProcessGroup bh_tracker
> WSGIApplicationGroup %{GLOBAL})` ||
> || '''`psycopg2`''' || `2.4.5` ||
> || '''`Pygments`''' || `1.6` ||
> || '''`Python`''' || `2.7.3 (default, Apr 14 2012, 08:58:41) [GCC]` ||
> || '''`pytz`''' || `2013b` ||
> || '''`setuptools`''' || `0.9.8` ||
> || '''`jQuery`''' || `1.7.2` ||
>
> ==== Enabled Plugins ====
> || '''`BloodhoundDashboardPlugin`''' || `0.6.0` ||
> || '''`BloodhoundMultiProduct`''' || `0.6.0` ||
> || '''`BloodhoundRelationsPlugin`''' || `0.6.0` ||
> || '''`BloodhoundSearchPlugin`''' || `0.6.0` ||
> || '''`BloodhoundTheme`''' || `0.6.0` ||
> || '''`TracAccountManager`''' || `0.4.3` ||
> || '''`TracPermRedirect`''' || `3.0` ||
> || '''`TracThemeEngine`''' || `2.2.0` ||
>
> ==== Python Traceback ====
> {{{
> Traceback (most recent call last):
>   File "/opt/apache-bloodhound-0.6/installer/bloodhound/lib/python2.7
> /site-packages/trac/web/main.py", line 477, in _dispatch_request
>     dispatcher.dispatch(req)
>   File "/opt/apache-bloodhound-0.6/installer/bloodhound/lib/python2.7
> /site-packages/trac/web/main.py", line 224, in dispatch
>     self._post_process_request(req, *resp)
>   File "/opt/apache-bloodhound-0.6/installer/bloodhound/lib/python2.7
> /site-packages/trac/web/main.py", line 338, in _post_process_request
>     resp = f.post_process_request(req, *resp)
>   File "/opt/apache-bloodhound-0.6/installer/bloodhound/lib/python2.7
> /site-packages/bhtheme/theme.py", line 476, in post_process_request
>     product_field = all_fields['product']
> KeyError: 'product'
> }}}

New description:

 ==== How to Reproduce ====

 While doing a GET operation on `/attachment/wiki/Topic1/Page1/Image1.png`,
 Trac issued an internal error.

 Clicking on an attachment link in a Wiki page results in an error message.

 Request parameters:
 {{{
 {'path': u'Topic1/Page1/Image1.png',
  'realm': u'wiki'}
 }}}

 User agent: `Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101
 Firefox/23.0`

 ==== System Information ====
 || '''`Trac`''' || `1.0.1` [[br]] `` ||
 || '''`Babel`''' || `1.3` ||
 || '''`Bloodhound Trac`''' || `1.0.1` ||
 || '''`Genshi`''' || `0.7 (without speedups)` ||
 || '''`GIT`''' || `1.8.1.4` ||
 || '''`mod_wsgi`''' || `3.3 (WSGIProcessGroup bh_tracker
 WSGIApplicationGroup %{GLOBAL})` ||
 || '''`psycopg2`''' || `2.4.5` ||
 || '''`Pygments`''' || `1.6` ||
 || '''`Python`''' || `2.7.3 (default, Apr 14 2012, 08:58:41) [GCC]` ||
 || '''`pytz`''' || `2013b` ||
 || '''`setuptools`''' || `0.9.8` ||
 || '''`jQuery`''' || `1.7.2` ||

 ==== Enabled Plugins ====
 || '''`BloodhoundDashboardPlugin`''' || `0.6.0` ||
 || '''`BloodhoundMultiProduct`''' || `0.6.0` ||
 || '''`BloodhoundRelationsPlugin`''' || `0.6.0` ||
 || '''`BloodhoundSearchPlugin`''' || `0.6.0` ||
 || '''`BloodhoundTheme`''' || `0.6.0` ||
 || '''`TracAccountManager`''' || `0.4.3` ||
 || '''`TracPermRedirect`''' || `3.0` ||
 || '''`TracThemeEngine`''' || `2.2.0` ||

 ==== Python Traceback ====
 {{{#!py
 Traceback (most recent call last):
   File "/opt/apache-bloodhound-0.6/installer/bloodhound/lib/python2.7
 /site-packages/trac/web/main.py", line 477, in _dispatch_request
     dispatcher.dispatch(req)
   File "/opt/apache-bloodhound-0.6/installer/bloodhound/lib/python2.7
 /site-packages/trac/web/main.py", line 224, in dispatch
     self._post_process_request(req, *resp)
   File "/opt/apache-bloodhound-0.6/installer/bloodhound/lib/python2.7
 /site-packages/trac/web/main.py", line 338, in _post_process_request
     resp = f.post_process_request(req, *resp)
   File "/opt/apache-bloodhound-0.6/installer/bloodhound/lib/python2.7
 /site-packages/bhtheme/theme.py", line 476, in post_process_request
     product_field = all_fields['product']
 KeyError: 'product'
 }}}

--

Comment:

 The root cause of this error seems to be related to a lower level failure
 of ''PostgreSQL'' DB backend that makes product ticket module component
 look like if it was disabled. I've removed the failure by applying
 [attachment:t639_r1516428_keyerror_product.diff attached patch] . It just
 emits messages when such issue is detected . Details

 {{{#!sh

 $ hg qapplied
 t639/t639_r1516428_keyerror_product.diff

 $ hg log -r qparent
 changeset:   398:17cd489fc827
 tag:         qparent
 tag:         svn-1516428
 user:        matevz@13f79535-47bb-0310-9956-ffa450edef68
 date:        Thu Aug 22 12:17:32 2013 +0000
 summary:     #444 - Show number of attachments next to attachment heading
 }}}

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/639#comment:3>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker

Reply via email to