Bug 247748 - Variable not defined (wrd)
Variable not defined (wrd)
Product: Fedora
Classification: Fedora
Component: gourmet (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Jef Spaleta
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-07-11 04:54 EDT by Tim Waugh
Modified: 2008-05-06 15:42 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-06 15:42:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tim Waugh 2007-07-11 04:54:08 EDT
Description of problem:
I got a traceback from gourmet a few days ago.  I'm afraid I no longer have the
traceback, but I do have the (incorrect, I think) patch that made it go away,
and the problem is quite clear.

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

--- /usr/lib/python2.4/site-packages/gourmet/defaults_en_GB.py.orig    
2007-07-06 14:12:45.000000000 +0100
+++ /usr/lib/python2.4/site-packages/gourmet/defaults_en_GB.py  2007-07-06
14:13:16.000000000 +0100
@@ -683,7 +683,7 @@
         if not wrd in rets: rets.append(wrd)
     if v_plural_matcher.search(s):
-        if not wrd in rets: rets.append(wrd)
+        #if not wrd in rets: rets.append(wrd)
     if one_digit_plural_matcher.search(s): rets.append(s[0:-1])
     return rets

The variable 'wrd' is referenced when it might not be defined.  The same problem
seems to be present in gourmet-0.13.3-1.fc7 as well.
Comment 1 Jef Spaleta 2007-07-11 08:59:25 EDT
Any chance you can describe the steps to make this happen?  Or produce a
screencast with one of the desktop recording tools showing your application
session which makes it happen.  I'd like to be able to poke at this a bit on my

Comment 2 Tim Waugh 2007-07-11 10:22:17 EDT
1. export LC_ALL=en_GB.UTF-8
2. gourmet
3. New Recipe
4. Click on Ingredients
5. In the 'Add ingredient' text-entry box type: "15 kalamata olives"
6. Click Add

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/gourmet/reccard.py", line 2949, in
    lambda *args: self.rc.add_ingredient_from_line(txt,
  File "/usr/lib/python2.5/site-packages/gourmet/reccard.py", line 1473, in
  File "/usr/lib/python2.5/site-packages/gourmet/Undo.py", line 48, in perform
  File "/usr/lib/python2.5/site-packages/gourmet/reccard.py", line 1467, in do_it
  File "/usr/lib/python2.5/site-packages/gourmet/reccard.py", line 2951, in <lambda>
  File "/usr/lib/python2.5/site-packages/gourmet/reccard.py", line 1066, in
    d=self.rg.rd.ingredient_parser(line, conv=self.rg.conv)
  File "/usr/lib/python2.5/site-packages/gourmet/backends/rdatabase.py", line
1132, in ingredient_parser
    if get_key: d['ingkey']=self.km.get_key(i.strip())
  File "/usr/lib/python2.5/site-packages/gourmet/keymanager.py", line 116, in
    result = self.look_for_key(txt)
  File "/usr/lib/python2.5/site-packages/gourmet/keymanager.py", line 135, in
  File "/usr/lib/python2.5/site-packages/gourmet/defaults_en_GB.py", line 686,
in guess_singulars
    if not wrd in rets: rets.append(wrd)
UnboundLocalError: local variable 'wrd' referenced before assignment
Comment 3 Bug Zapper 2008-04-04 03:27:44 EDT
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers
Comment 4 Bug Zapper 2008-05-06 15:42:24 EDT
This bug is open for a Fedora version that is no longer maintained and
will not be fixed by Fedora. Therefore we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen thus bug against that version.

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.