Bug 506204 - gourmet crashes when opening its recipe database
gourmet crashes when opening its recipe database
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: gourmet (Show other bugs)
11
All Linux
low Severity high
: ---
: ---
Assigned To: Jef Spaleta
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-15 21:42 EDT by Robert Andrew Uhl
Modified: 2009-11-24 02:56 EST (History)
4 users (show)

See Also:
Fixed In Version: 0.15.0-3.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-11-24 02:56:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Robert Andrew Uhl 2009-06-15 21:42:45 EDT
Description of problem: When started, gourmet displays an error upon encountering a database from a previous version.


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


How reproducible: very


Steps to Reproduce:
1. start gourmet, from GUI or command line
  
Actual results:

Database Connection Failed.

There was a problem with the database information you gave Gourmet

Details

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/gourmet/GourmetRecipeManager.py", line 446, in init_recipes
    check_for_data_to_import(self.rd)
  File "/usr/lib/python2.6/site-packages/gourmet/GourmetRecipeManager.py", line 55, in check_for_data_to_import
    sublabel=_('Importing recipe data from a previous version of Gourmet into new database.'),
  File "/usr/lib/python2.6/site-packages/gourmet/dialog_extras.py", line 357, in __init__
    cancel=cancel,modal=modal)
  File "/usr/lib/python2.6/site-packages/gourmet/dialog_extras.py", line 52, in __init__
    self.setup_buttons(cancel, okay)
  File "/usr/lib/python2.6/site-packages/gourmet/dialog_extras.py", line 400, in setup_buttons
    self.pause = gtk.ToggleButton(_('_Pause'),True)
RuntimeError: more argument specifiers than keyword list entries (remaining format:'):GtkToggleButton.__init__')



Expected results:

Successful start-up


Additional info: python trace on console:

$ gourmet
/usr/lib/python2.6/site-packages/gourmet/thumbnail.py:1: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import Image, urllib, md5, os.path, os, StringIO
Player is  gourmet.sound_gnome.Player
Fixing broken ingredient-key view from earlier versions.
UPDATE FROM < 0.13.0...
Alter table
ALTER TABLE recipe ADD last_modified INTEGER
Failed to execute:
sql   :  ALTER TABLE recipe ADD last_modified INTEGER
params:  []
Perhaps the table already existed.
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/gourmet/backends/sql_db.py", line 58, in add_column_to_table
    'ALTER TABLE %(table)s ADD %(colname)s %(typ)s'%locals()
  File "/usr/lib/python2.6/site-packages/gourmet/backends/sql_db.py", line 101, in execute
    cursor.execute(sql,params)
OperationalError: duplicate column name: last_modified
Fearlessly charging onward...
Alter table
ALTER TABLE recipe ADD recipe_hash VARCHAR(32)
Failed to execute:
sql   :  ALTER TABLE recipe ADD recipe_hash VARCHAR(32)
params:  []
Perhaps the table already existed.
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/gourmet/backends/sql_db.py", line 58, in add_column_to_table
    'ALTER TABLE %(table)s ADD %(colname)s %(typ)s'%locals()
  File "/usr/lib/python2.6/site-packages/gourmet/backends/sql_db.py", line 101, in execute
    cursor.execute(sql,params)
OperationalError: duplicate column name: recipe_hash
Fearlessly charging onward...
Alter table
ALTER TABLE recipe ADD ingredient_hash VARCHAR(32)
Failed to execute:
sql   :  ALTER TABLE recipe ADD ingredient_hash VARCHAR(32)
params:  []
Perhaps the table already existed.
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/gourmet/backends/sql_db.py", line 58, in add_column_to_table
    'ALTER TABLE %(table)s ADD %(colname)s %(typ)s'%locals()
  File "/usr/lib/python2.6/site-packages/gourmet/backends/sql_db.py", line 101, in execute
    cursor.execute(sql,params)
OperationalError: duplicate column name: ingredient_hash
Fearlessly charging onward...
Alter table
ALTER TABLE recipe ADD link text
Failed to execute:
sql   :  ALTER TABLE recipe ADD link text
params:  []
Perhaps the table already existed.
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/gourmet/backends/sql_db.py", line 58, in add_column_to_table
    'ALTER TABLE %(table)s ADD %(colname)s %(typ)s'%locals()
  File "/usr/lib/python2.6/site-packages/gourmet/backends/sql_db.py", line 101, in execute
    cursor.execute(sql,params)
OperationalError: duplicate column name: link
Fearlessly charging onward...
Searching for links in old recipe fields...

<Error is displayed here, then dismissed>

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 1489, in startGUI 
    r=RecGui(splash_label=splash.label)
  File "/usr/lib/python2.6/site-packages/gourmet/GourmetRecipeManager.py", line 165, in __init__
    self.init_recipes()
  File "/usr/lib/python2.6/site-packages/gourmet/GourmetRecipeManager.py", line 446, in init_recipes
    check_for_data_to_import(self.rd)
  File "/usr/lib/python2.6/site-packages/gourmet/GourmetRecipeManager.py", line 55, in check_for_data_to_import
    sublabel=_('Importing recipe data from a previous version of Gourmet into new database.'),
  File "/usr/lib/python2.6/site-packages/gourmet/dialog_extras.py", line 357, in __init__
    cancel=cancel,modal=modal)
  File "/usr/lib/python2.6/site-packages/gourmet/dialog_extras.py", line 52, in __init__
    self.setup_buttons(cancel, okay)
  File "/usr/lib/python2.6/site-packages/gourmet/dialog_extras.py", line 400, in setup_buttons
    self.pause = gtk.ToggleButton(_('_Pause'),True)
RuntimeError: more argument specifiers than keyword list entries (remaining format:'):GtkToggleButton.__init__')
Comment 1 Pete Lawler 2009-06-22 05:38:52 EDT
Getting the same here. I hope I won't starve! ;)
Comment 2 Jeffrey C. Ollie 2009-06-30 16:45:40 EDT
I tried updating to 0.13.8 but it has problems of it's own:

$ gourmet 
/usr/lib/python2.6/site-packages/gourmet/thumbnail.py:1: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import Image, urllib, md5, os.path, os, StringIO
Using sqlite3
Player is  gourmet.sound_gnome.Player
/usr/lib/python2.6/site-packages/gourmet/prefsGui.py:56: GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
  self.glade = gtk.glade.XML(glade)
Failed to execute:
sql   :  SELECT rowid, word, item, ingkey, count, rowid FROM keylookup where item ==  ? AND ingkey ==  ? 
params:  ['jalape\xc3\xb1o pepper', 'pepper, jalape\xc3\xb1o']
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 1528, in startGUI
    r=RecGui(splash_label=splash.label)
  File "/usr/lib/python2.6/site-packages/gourmet/GourmetRecipeManager.py", line 169, in __init__
    self.init_recipes()
  File "/usr/lib/python2.6/site-packages/gourmet/GourmetRecipeManager.py", line 462, in init_recipes
    self.rd = recipeManager.RecipeManager(**recipeManager.dbargs)
  File "/usr/lib/python2.6/site-packages/gourmet/backends/sqlite_db.py", line 97, in __init__
    self.km = keymanager.KeyManager(rm=self)
  File "/usr/lib/python2.6/site-packages/gourmet/keymanager.py", line 31, in __init__
    self.initialize_from_defaults()
  File "/usr/lib/python2.6/site-packages/gourmet/keymanager.py", line 37, in initialize_from_defaults
    self.rm.add_ing_to_keydic(i,key)
  File "/usr/lib/python2.6/site-packages/gourmet/backends/rdatabase.py", line 960, in add_ing_to_keydic
    row = self.fetch_one(self.ikview, item=item, ingkey=key)
  File "/usr/lib/python2.6/site-packages/gourmet/backends/sql_db.py", line 170, in fetch_one
    self.execute(self.cursor,'SELECT '+', '.join(column_names)+' FROM %s '%table + where,params)
  File "/usr/lib/python2.6/site-packages/gourmet/backends/sql_db.py", line 114, in execute
    cursor.execute(sql,params)
sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
Comment 3 Russell Harrison 2009-07-03 08:38:43 EDT
This also happens for the creation of a new database.  I deleted my ~/.gourmet directory and still got the same error given in the description.
Comment 4 Russell Harrison 2009-08-24 12:53:27 EDT
I have verified that the update for bug 518864 fixes this issue for me as well.

https://admin.fedoraproject.org/updates/gourmet-0.15.0-2.fc11
Comment 5 Jef Spaleta 2009-08-24 13:53:46 EDT
Russell:

Does the database import work with 0.15?

One of my concerns about moving to 0.15.  If there's any regressions with regard to database import.. please let me know.
Comment 6 Fedora Update System 2009-08-26 22:11:57 EDT
gourmet-0.15.0-3.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gourmet'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8971
Comment 7 Russell Harrison 2009-09-03 23:31:46 EDT
(In reply to comment #5)
> Russell:
> 
> Does the database import work with 0.15?
> 
> One of my concerns about moving to 0.15.  If there's any regressions with
> regard to database import.. please let me know.  

Jef,

Unfortunately, I only had a very few recipes in my database so I'd be hard pressed to say there weren't any issues with the import.  If you have more complex data in the old format available I'd be happy to test with it.
Comment 8 Fedora Update System 2009-11-24 02:56:48 EST
gourmet-0.15.0-3.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

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