Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 317555

Summary: Gourmet Recipe Manager crashes on startup with TypeError: Boolean value of this clause is not defined
Product: Gentoo Linux Reporter: Ben Scanlon <benscanlon>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED FIXED    
Severity: critical    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Should fix the bug in gourmet

Description Ben Scanlon 2010-04-27 23:53:22 UTC
I'm not sure which part of the error message is relevant but this is what I get when I try to start it via command line.  I get nothing at all when starting it via the applications menu


WARNING: Plugin module import failed
PATH: ['/usr/bin', '/usr/lib/python26.zip', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/site-packages', '/usr/lib/python2.6/site-packages/PIL', '/usr/lib/python2.6/site-packages/gst-0.10', '/usr/lib/python2.6/site-packages/gtk-2.0', '/usr/lib/portage/pym', '/usr/share/gourmet', '/usr/lib/python2.6/site-packages/gourmet/plugins']
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/gourmet/plugin_loader.py", line 241, in get_module
    self._loaded = __import__(self.module)
  File "/usr/lib/python2.6/site-packages/gourmet/plugins/spellcheck/__init__.py", line 1, in <module>
    import reccard_spellcheck_plugin
  File "/usr/lib/python2.6/site-packages/gourmet/plugins/spellcheck/reccard_spellcheck_plugin.py", line 1, in <module>
    import gtk, gtkspell
ImportError: No module named gtkspell
WARNING: Failed to load plugin spellcheck
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/gourmet/plugin_loader.py", line 92, in load_active_plugins
    self.active_plugins.extend(self.available_plugin_sets[p].plugins)
  File "/usr/lib/python2.6/site-packages/gourmet/plugin_loader.py", line 254, in __getattr__
    if attr == 'plugins': return self.get_plugins()
  File "/usr/lib/python2.6/site-packages/gourmet/plugin_loader.py", line 260, in get_plugins
    return self.get_module().plugins
AttributeError: 'NoneType' object has no attribute 'plugins'
/usr/lib/python2.6/site-packages/gourmet/backends/db.py:294: SADeprecationWarning: The Binary type has been renamed to LargeBinary.
  Column('image',Binary(),**{}),
/usr/lib/python2.6/site-packages/gourmet/backends/db.py:295: SADeprecationWarning: The Binary type has been renamed to LargeBinary.
  Column('thumb',Binary(),**{}),
Traceback (most recent call last):
  File "/usr/bin/gourmet", line 35, in <module>
    gourmet.GourmetRecipeManager.startGUI()
  File "/usr/lib/python2.6/site-packages/gourmet/GourmetRecipeManager.py", line 709, in startGUI
    r=RecGui(splash_label=splash.label)
  File "/usr/lib/python2.6/site-packages/gourmet/GourmetRecipeManager.py", line 916, in __init__
    GourmetApplication.__init__(self, splash_label=splash_label)
  File "/usr/lib/python2.6/site-packages/gourmet/GourmetRecipeManager.py", line 113, in __init__
    self.setup_recipes() # Setup recipe database
  File "/usr/lib/python2.6/site-packages/gourmet/GourmetRecipeManager.py", line 203, in setup_recipes
    self.rd = recipeManager.default_rec_manager()
  File "/usr/lib/python2.6/site-packages/gourmet/recipeManager.py", line 132, in default_rec_manager
    return get_recipe_manager(**dbargs)
  File "/usr/lib/python2.6/site-packages/gourmet/recipeManager.py", line 127, in get_recipe_manager
    return RecipeManager(**args)
  File "/usr/lib/python2.6/site-packages/gourmet/backends/db.py", line 1733, in __init__
    self.km = keymanager.get_keymanager(rm=self)
  File "/usr/lib/python2.6/site-packages/gourmet/keymanager.py", line 531, in get_keymanager
    return KeyManager(*args,**kwargs)
  File "/usr/lib/python2.6/site-packages/gourmet/keymanager.py", line 40, in __init__
    self.initialize_categories()
  File "/usr/lib/python2.6/site-packages/gourmet/keymanager.py", line 81, in initialize_categories
    for k in self.rm.get_unique_values('ingkey',self.rm.ingredients_table,deleted=False):
  File "/usr/lib/python2.6/site-packages/gourmet/backends/db.py", line 791, in get_unique_values
    if not table: table=self.recipe_table
  File "/usr/lib/python2.6/site-packages/sqlalchemy/sql/expression.py", line 1282, in __nonzero__
    raise TypeError("Boolean value of this clause is not defined")
TypeError: Boolean value of this clause is not defined


Reproducible: Always

Steps to Reproduce:
1. Start Gourmet
2.
3.

Actual Results:  
If started via the application menu, the startup graphic appears and then goes away.  No window for the application appears  

Expected Results:  
Started up
Comment 1 Bartłomiej Majka 2010-04-28 19:13:47 UTC
Try: emerge gtkspell-python.
Comment 2 Ben Scanlon 2010-04-28 22:24:33 UTC
(In reply to comment #1)
> Try: emerge gtkspell-python.
> 

That gets rid of part of the error message but it still crashes.

/usr/lib/python2.6/site-packages/gourmet/backends/db.py:294: SADeprecationWarning: The Binary type has been renamed to LargeBinary.
  Column('image',Binary(),**{}),
/usr/lib/python2.6/site-packages/gourmet/backends/db.py:295: SADeprecationWarning: The Binary type has been renamed to LargeBinary.
  Column('thumb',Binary(),**{}),
Traceback (most recent call last):
  File "/usr/bin/gourmet", line 35, in <module>
    gourmet.GourmetRecipeManager.startGUI()
  File "/usr/lib/python2.6/site-packages/gourmet/GourmetRecipeManager.py", line 709, in startGUI
    r=RecGui(splash_label=splash.label)
  File "/usr/lib/python2.6/site-packages/gourmet/GourmetRecipeManager.py", line 916, in __init__
    GourmetApplication.__init__(self, splash_label=splash_label)
  File "/usr/lib/python2.6/site-packages/gourmet/GourmetRecipeManager.py", line 113, in __init__
    self.setup_recipes() # Setup recipe database
  File "/usr/lib/python2.6/site-packages/gourmet/GourmetRecipeManager.py", line 203, in setup_recipes
    self.rd = recipeManager.default_rec_manager()
  File "/usr/lib/python2.6/site-packages/gourmet/recipeManager.py", line 132, in default_rec_manager
    return get_recipe_manager(**dbargs)
  File "/usr/lib/python2.6/site-packages/gourmet/recipeManager.py", line 127, in get_recipe_manager
    return RecipeManager(**args)
  File "/usr/lib/python2.6/site-packages/gourmet/backends/db.py", line 1733, in __init__
    self.km = keymanager.get_keymanager(rm=self)
  File "/usr/lib/python2.6/site-packages/gourmet/keymanager.py", line 531, in get_keymanager
    return KeyManager(*args,**kwargs)
  File "/usr/lib/python2.6/site-packages/gourmet/keymanager.py", line 40, in __init__
    self.initialize_categories()
  File "/usr/lib/python2.6/site-packages/gourmet/keymanager.py", line 81, in initialize_categories
    for k in self.rm.get_unique_values('ingkey',self.rm.ingredients_table,deleted=False):
  File "/usr/lib/python2.6/site-packages/gourmet/backends/db.py", line 791, in get_unique_values
    if not table: table=self.recipe_table
  File "/usr/lib/python2.6/site-packages/sqlalchemy/sql/expression.py", line 1282, in __nonzero__
    raise TypeError("Boolean value of this clause is not defined")
TypeError: Boolean value of this clause is not defined
Comment 3 Bartłomiej Majka 2010-04-28 23:17:59 UTC
emerge --sync && emerge sqlalchemy should fix this.
Comment 4 Ben Scanlon 2010-04-29 01:05:39 UTC
(In reply to comment #3)
> emerge --sync && emerge sqlalchemy should fix this.
> 

I did that and am still getting the same error message.    Could this be a database corruption issue?

In case it helps here are some program versions that I have installed.
gourmet 0.15
python 3.1.2-r2
sqlalchemy 0.6.0
sqlite 3.6.23.1
Comment 5 Bartłomiej Majka 2010-04-29 09:09:11 UTC
Created attachment 229637 [details, diff]
Should fix the bug in gourmet

Wasn't tested.
Comment 6 Bartłomiej Majka 2010-04-29 18:57:48 UTC
The patch fixes the problem for me. However, gourmet still doesn't work correctly because when I try to close it, the windows disappers but the command line shows the application is still running.
Comment 7 Bartłomiej Majka 2010-04-29 20:57:13 UTC
The warnings were caused by other bugs in gourmet and a bug in sqlalchemy. I submitted the patches to upstream:

https://sourceforge.net/tracker/?func=detail&aid=2994363&group_id=66150&atid=513503

https://sourceforge.net/tracker/?func=detail&aid=2993965&group_id=108118&atid=649652

Comment 8 Ben Scanlon 2010-04-29 23:32:38 UTC
(In reply to comment #7)
> The warnings were caused by other bugs in gourmet and a bug in sqlalchemy. I
> submitted the patches to upstream:
> 
> https://sourceforge.net/tracker/?func=detail&aid=2994363&group_id=66150&atid=513503
> 
> https://sourceforge.net/tracker/?func=detail&aid=2993965&group_id=108118&atid=649652
> 

Made those changes and it is working again.  Thanks!