Bug 717042 - [abrt] gourmet-0.15.9-1.fc15: reccard.py:2103:commit_iter:KeyError: 'ingkey'
Summary: [abrt] gourmet-0.15.9-1.fc15: reccard.py:2103:commit_iter:KeyError: 'ingkey'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gourmet
Version: 15
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jef Spaleta
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:c3fc4426a2de85c01a3f96a8b1d...
: 771080 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-27 19:30 UTC by Robert Kief
Modified: 2012-07-22 17:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-14 21:50:53 UTC
Type: ---


Attachments (Terms of Use)
Fixed upstream (804 bytes, patch)
2012-06-19 21:36 UTC, Sean Sheedy
no flags Details | Diff
RPM spec file for patch (5.51 KB, text/plain)
2012-06-19 21:48 UTC, Sean Sheedy
no flags Details

Description Robert Kief 2011-06-27 19:30:25 UTC
abrt version: 2.0.3
architecture:   x86_64
cmdline:        /usr/bin/python /usr/bin/gourmet
comment:        I attempted to edit a recipe imported from a web page.  After beginning to  import the web page, I have to clear the tags as the info tagged is incorrect.  I manually selected the tags and then completed the import.  Not all of the page's images displayed.  After finishing the import, I had more edits to do to the recipe, including adding a saved image.  Since I have seen this problem before with Fedora 14, I attempted to save the first part of my edits.  The save did not happen and the bug report icon appeared.  This was my first attempt to do an import within Fedora 15.
component:      gourmet
executable:     /usr/bin/gourmet
kernel:         2.6.38.8-32.fc15.x86_64
os_release:     Fedora release 15 (Lovelock)
package:        gourmet-0.15.9-1.fc15
reason:         reccard.py:2103:commit_iter:KeyError: 'ingkey'
time:           Mon Jun 27 14:20:46 2011
uid:            500
username:       rk00253

backtrace:
:reccard.py:2103:commit_iter:KeyError: 'ingkey'
:
:Traceback (most recent call last):
:  File "/usr/lib/python2.7/site-packages/gourmet/reccard.py", line 1029, in save_cb
:    newdict = m.save(newdict)
:  File "/usr/lib/python2.7/site-packages/gourmet/reccard.py", line 1231, in save
:    self.ingtree_ui.ingController.commit_ingredients()
:  File "/usr/lib/python2.7/site-packages/gourmet/reccard.py", line 2132, in commit_ingredients
:    n = commit_iter(iter,n)
:  File "/usr/lib/python2.7/site-packages/gourmet/reccard.py", line 2077, in commit_iter
:    pos = commit_iter(i,pos,group)
:  File "/usr/lib/python2.7/site-packages/gourmet/reccard.py", line 2103, in commit_iter
:    if getattr(ing,att)==d[att]: del d[att]
:KeyError: 'ingkey'
:
:Local variables in innermost frame:
:group: 'Red-Chili Rub:\n\n    1 Tbsp.\xc2\xa0ancho chile powder \n\n    1 Tbsp.\xc2\xa0paprika \n\n    1 Tbsp.\xc2\xa0brown sugar \n\n    1 tsp.\xc2\xa0kosher salt \n\n    2 tsp.\xc2\xa0ground cumin \n\n    2 tsp.\xc2\xa0granulated garlic \n\n    2 tsp.\xc2\xa0ground black pepper'
:d: {'inggroup': 'Red-Chili Rub:\n\n    1 Tbsp.\xc2\xa0ancho chile powder \n\n    1 Tbsp.\xc2\xa0paprika \n\n    1 Tbsp.\xc2\xa0brown sugar \n\n    1 tsp.\xc2\xa0kosher salt \n\n    2 tsp.\xc2\xa0ground cumin \n\n    2 tsp.\xc2\xa0granulated garlic \n\n    2 tsp.\xc2\xa0ground black pepper', 'position': 1, 'optional': False}
:deleted: [(13557, 1105, None, None, None, None, u'', u'', None, None, u'Red-Chili Rub:\n\n    1 Tbsp.\xa0ancho chile powder \n\n    1 Tbsp.\xa0paprika \n\n    1 Tbsp.\xa0brown sugar \n\n    1 tsp.\xa0kosher salt \n\n    2 tsp.\xa0ground cumin \n\n    2 tsp.\xa0granulated garlic \n\n    2 tsp.\xa0ground black pepper', 1, False), (13558, 1105, None, None, 4.0, None, u'handfuls of hickory wood chips, soaked in water for at least 30 minutes', u'handfuls of hickory wood chips, soaked in water for at least 30 minutes', None, None, u'Red-Chili Rub:\n\n    1 Tbsp.\xa0ancho chile powder \n\n    1 Tbsp.\xa0paprika \n\n    1 Tbsp.\xa0brown sugar \n\n    1 tsp.\xa0kosher salt \n\n    2 tsp.\xa0ground cumin \n\n    2 tsp.\xa0granulated garlic \n\n    2 tsp.\xa0ground black pepper', 2, False)]
:self: <gourmet.reccard.IngredientController instance at 0x676f5a8>
:pos: 1
:iter: <GtkTreeIter at 0x87d61a0>
:att: 'ingkey'
:commit_iter: <function commit_iter at 0x8504c08>
:ing: (13557, 1105, None, None, None, None, u'', u'', None, None, u'Red-Chili Rub:\n\n    1 Tbsp.\xa0ancho chile powder \n\n    1 Tbsp.\xa0paprika \n\n    1 Tbsp.\xa0brown sugar \n\n    1 tsp.\xa0kosher salt \n\n    2 tsp.\xa0ground cumin \n\n    2 tsp.\xa0granulated garlic \n\n    2 tsp.\xa0ground black pepper', 1, False)

Comment 1 Robert Kief 2011-10-21 16:49:57 UTC
Package: gourmet-0.15.9-1.fc15
Architecture: x86_64
OS Release: Fedora release 15 (Lovelock)

Comment
-----
After importing a web page, I attempted editing and then saving the result.  I made only one edit - adding the category to the recipe page.  The edit would not save and the bug reporting tool appeared.

Comment 2 Robert Kief 2011-11-14 20:25:42 UTC
Package: gourmet-0.15.9-1.fc16
Architecture: x86_64
OS Release: Fedora release 16 (Verne)

Comment
-----
After importing a webpage, I attempted to edit the resulting recipe.  I attempted to add only one item, the category, and this failed.  At that time, the Atuomatic Bug Reporting Tool icon appeared.

Comment 3 Sean Sheedy 2012-01-02 22:22:18 UTC
Package: gourmet-0.15.9-1.fc15
Architecture: x86_64
OS Release: Fedora release 15 (Lovelock)

Comment
-----
1. Edit a recipe.
2. Change the type to, e.g., "Appetizer".
3. Save the change.

Comment 4 Sean Sheedy 2012-01-02 22:24:01 UTC
*** Bug 771080 has been marked as a duplicate of this bug. ***

Comment 5 Sean Sheedy 2012-01-09 01:25:47 UTC
Package: gourmet-0.15.9-1.fc15
Architecture: x86_64
OS Release: Fedora release 15 (Lovelock)

Comment
-----
Imported and attempted to edit a recipe from:

http://www.saveur.com/article/Recipes/Zaatar-Dip

Comment 6 Sean Sheedy 2012-01-23 00:38:06 UTC
Package: gourmet-0.15.9-1.fc15
Architecture: x86_64
OS Release: Fedora release 15 (Lovelock)

Comment
-----
1.  Imported recipe from http://www.foodnetwork.com/recipes/paula-deen/old-time-beef-stew-recipe/index.html
2.  Edited recipe
3.  Attempted to save

Comment 7 Jeff Raber 2012-02-23 01:54:24 UTC
1. Imported recipe from website.
2. Open Recipe
3. Edit Instructions.
4. Paste in instructions (copied from webpage)
5. Save
6. Crash.


Package: gourmet-0.15.9-1.fc16
OS Release: Fedora release 16 (Verne)

Comment 8 Robert Kief 2012-06-15 19:21:31 UTC
I had just added an on-line recipe to Gourmet and had finished editing the page.  When I tried to save my edits, the Auto. Reporting Bug icon appeared.

Package: gourmet-0.15.9-3.fc17
OS Release: Fedora release 17 (Beefy Miracle)

Comment 9 Robert Kief 2012-06-16 19:24:21 UTC
Not all webpages result in this bug occurring.  I downloaded one recipe (http://www.tasteofhome.com/Recipes/Easy-Molasses-Sticky-Buns/Print) to a newly started iteration of Gourmet that resulted in the bug occurring.  I downloaded a second recipe from a different site (http://www.ifood.tv/print/246183) and this page edited properly.  I downloaded a third recipe from yet another site (http://freebisquickrecipes.com/Impossible-Beef-Enchilada-Pie.html) and this recipe wouldn't edit.

I have another computer running Ubuntu 10.04 LTS and Gourmet Recipe Manager ver. 0.15.3 and it doesn't display this bug.

In the past, at your request, I sent you a copy of my recipe.db file to assist in troubleshooting a different problem.  You should still have access to this file if it is needed to troubleshoot this bug.

Thanks,

RLK

Comment 10 Sean Sheedy 2012-06-19 21:36:50 UTC
Created attachment 593072 [details]
Fixed upstream

This bug has been fixed upstream.  Attached is a patch derived from the upstream  source that that corrects the problem in the current release.

Comment 11 Robert Kief 2012-06-19 21:41:51 UTC
How do I install this patch, Sean?

Rhanks,

RLK

Comment 12 Robert Kief 2012-06-19 21:42:43 UTC
That would be "Thanks" not "Rhanks".

RLK

Comment 13 Sean Sheedy 2012-06-19 21:48:43 UTC
Created attachment 593079 [details]
RPM spec file for patch

You need to rebuild from source to make use of the patch.  I've attached the RPM spec file I used.

Comment 14 Robert Kief 2012-06-19 23:18:01 UTC
I'm afraid your request is beyond my abilities, Sean.  I haven't compiled anything for decades.  If you can send me something executable, I'll install that and report back.  I know how to install software using yum in terminal (although I use yumex most of the time), but that's about it.

Sorry,

RLK

Comment 15 Jeff Raber 2012-06-19 23:34:25 UTC
Hi Robert,
I am a co-maintainer for this package.  I will apply the patch provided by Sean and submit a build for testing (hopefully tonight).

Comment 16 Robert Kief 2012-06-20 18:21:37 UTC
Afternoon, Jeff.

If installing this patch(?) is something other than using yum to install an rpm file, please give step by step instructions so I do it correctly.  I'll try adding those recipes that demonstrated the bug before the patch and see what happens.  Then I'll report back the results.

Thanks,

RLK

Comment 17 Fedora Update System 2012-06-22 16:52:07 UTC
gourmet-0.15.9-4.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/gourmet-0.15.9-4.fc16

Comment 18 Fedora Update System 2012-06-22 16:52:18 UTC
gourmet-0.15.9-4.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/gourmet-0.15.9-4.fc17

Comment 19 Fedora Update System 2012-06-26 00:39:13 UTC
Package gourmet-0.15.9-4.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gourmet-0.15.9-4.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-9862/gourmet-0.15.9-4.fc17
then log in and leave karma (feedback).

Comment 20 Robert Kief 2012-06-27 15:18:25 UTC
I tried to log into the above url, but my username/password wasn't recogized.  Hopefully putting my feedback here is OK.

It appears that this bug is repaired as I have been able to properly edit and save all three of the examples in Comment 9.  I have not had time to try any new recipes yet.  I'll do that later today.

One problem did happen as I was editing a recipe.  I inadvertently edited a measure incorrectly.  The Gourmet error message appeared to alert me to the problem.  The line I was editing stuck to the cursur as though I was trying to drag it to a different location.  I dropped it onto the existing line and editied that line measure correctly.  I then noticed the Bug Reporting Tool icon had appeared.  I just finished reporting this as bug #835932.

I just tried editing a tsp measure to Tbsp and got the Gourmet notice.  I was able to change tsp to oz with no error being given.  A problem to be noted on Bug #835932?

Comment 21 Sean Sheedy 2012-06-27 17:31:04 UTC
Robert,

What you're seeing is a different bug than the patch addresses.  There are a lot of other bug fixes upstream, but the code has been restructured enough that I don't think it's practical to backport them.

Comment 22 Robert Kief 2012-06-27 18:33:50 UTC
I thought that might be the case, Sean.  I wanted to mention it in comment 20 in the off chance it was part of bug 717042.

I'll do more testing of this patch later today and report back.

Thanks,

RLK

Comment 23 Fedora Update System 2012-07-14 21:50:53 UTC
gourmet-0.15.9-4.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 24 Fedora Update System 2012-07-14 21:53:49 UTC
gourmet-0.15.9-4.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 25 Robert Kief 2012-07-22 17:38:52 UTC
I have imported and edited quite a few recipes from a variety of sites without problems.  The lone exception I would comment on is the automatic selection of tags.  As mentioned in Description, it is necessary to clear all selected tags before manually tagging those that are appropriate.  Using "Clear Tags" can result in important data being erased from the page so manually clearing each individual tag is required.  It would simplify recipe entry if the automatic tagging feature was made optional.

Thank you,
RLK


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