abrt version: 1.1.13 architecture: x86_64 Attached file: backtrace cmdline: /usr/bin/python /usr/bin/gourmet component: gourmet executable: /usr/bin/gourmet kernel: 2.6.35.6-48.fc14.x86_64 package: gourmet-0.15.6-1.fc14 reason: db.py:891:add_column_to_table:AttributeError: 'Float' object has no attribute 'get_col_spec' release: Fedora release 14 (Laughlin) time: 1290611401 uid: 500 How to reproduce ----- 1. open gourmet 2. watch it crash 3.
Created attachment 462661 [details] File: backtrace
George, I take it you have a pre-existing recipe database on your system? Would be willing to give me your recipe database so that I can try to reproduce this on my systems. Clean installs of gourmet with no pre-existing recipe database works for me. In fact you can test that on your system by creating a new user for testing, login as that new user and run gourmet. -jef
Upstream bugreport: http://sourceforge.net/tracker/?func=detail&aid=3107472&group_id=108118&atid=649652 It looks like your recipe database was created with gourmet-0.13.4 and gourmet is crashing while trying to update the DB. There is a patch upstream to resolve this issue: http://grecipe-manager.git.sourceforge.net/git/gitweb.cgi?p=grecipe-manager/grecipe-manager;a=blobdiff;f=src/lib/backends/db.py;h=b133deed817798ea3700ed205a371a277ac3306e;hp=1487d94a5beb58b81cea680424e7077a919185bd;hb=e382676dff2cb3ba4aa61e7834e554052303287f;hpb=6e5b8ab5a36519529222308360f64b6678df5776
*** Bug 651871 has been marked as a duplicate of this bug. ***
gourmet-0.15.6-2.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/gourmet-0.15.6-2.fc13
gourmet-0.15.6-2.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/gourmet-0.15.6-2.fc14
gourmet-0.15.6-2.fc13 has been pushed to the Fedora 13 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: https://admin.fedoraproject.org/updates/gourmet-0.15.6-2.fc13
(In reply to comment #7) > gourmet-0.15.6-2.fc13 has been pushed to the Fedora 13 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: > https://admin.fedoraproject.org/updates/gourmet-0.15.6-2.fc13 I built the src.rpm file for fc13 for my fc14 x86_64 system. It seemed to get past the updating database stage -- at least it through up a dialog box saying that it would update the database and that it was making a backup -- it seems to have successfully created the backup and then died. Here is the output: [ggalt@george noarch]$ gourmet Database older than 0.14.7 -- updating 0.13.4 Database older than 0.14.0 -- updating 0.13.4 Making a backup copy of DB in /home/ggalt/.gourmet/recipes.db.backup-24-11-10 You can use it to restore if something ugly happens. Upgrade from < 0.14 0.13.4 Attempting to alter categories <bound method RecipeManager.setup_category_table of <gourmet.backends.db.RecipeManager instance at 0x3985488>> {'id': 'recipe_id'} ['category'] Traceback (most recent call last): File "/usr/bin/gourmet", line 35, in <module> gourmet.GourmetRecipeManager.startGUI() File "/usr/lib/python2.7/site-packages/gourmet/GourmetRecipeManager.py", line 715, in startGUI r=RecGui(splash_label=splash.label) File "/usr/lib/python2.7/site-packages/gourmet/GourmetRecipeManager.py", line 918, in __init__ GourmetApplication.__init__(self, splash_label=splash_label) File "/usr/lib/python2.7/site-packages/gourmet/GourmetRecipeManager.py", line 114, in __init__ self.setup_recipes() # Setup recipe database File "/usr/lib/python2.7/site-packages/gourmet/GourmetRecipeManager.py", line 204, in setup_recipes self.rd = recipeManager.default_rec_manager() File "/usr/lib/python2.7/site-packages/gourmet/recipeManager.py", line 131, in default_rec_manager return get_recipe_manager(**dbargs) File "/usr/lib/python2.7/site-packages/gourmet/recipeManager.py", line 126, in get_recipe_manager return RecipeManager(**args) File "/usr/lib/python2.7/site-packages/gourmet/backends/db.py", line 1760, in __init__ RecData.__init__(self,*args,**kwargs) File "/usr/lib/python2.7/site-packages/gourmet/backends/db.py", line 165, in __init__ self.update_version_info(gourmet.version.version) File "/usr/lib/python2.7/site-packages/gourmet/backends/db.py", line 510, in update_version_info except sqlite3.OperationalError: NameError: global name 'sqlite3' is not defined I currently have the following installed: qt-sqlite-4.7.0-8.fc14.x86_64 sqlite-3.6.23.1-1.fc14.x86_64 python-sqlite2-2.3.5-3.fc14.x86_64 mono-data-sqlite-2.6.7-3.fc14.x86_64 I'm happy to run other tests or do additional builds if needed. George
This error is somewhat of a red herring. the sqlite3.OperationalError statement is stale code that shouldn't even get hit by a user anymore. The problem here is with a change in in how sqlalchemy does what it does and there's a chunk of code to try to deal with the changes in the sql schema that different versions of sqlalchemy have used over time. How old is that recipe database? You may need to manually update it. The best thing you could do for me is give me access to your recipe database so I can look at it and figure out exactly why gourmet is failing. Once I have a failing database, I'm pretty sure I can track down the problem in an hour or two. This is basically going to involve a hunt through the logic of db.py and trying different things to correctly read the old database. -jef
Created attachment 462797 [details] Zip file of old database that is causing the crash
Jef: Sorry, I thought I had sent the database to you separately in an email. I've attached it. While I am curious to see what is in the database, I can live without it, so it will be no big loss to just start from scratch. Thanks for all of your help. George
thanks for the zip. I should be able to dig into this over the weekend and send a patch upstream to get this fixed for everyone. -jef
Created attachment 462810 [details] Patch to fix DB Update related crash Attaching patch to fix the crash reported in comment 8. Submitted upstream @ https://sourceforge.net/tracker/?func=detail&aid=3118096&group_id=108118&atid=649654 With this patch I was able to successfully update/open the DB attached to this bug
Created attachment 462811 [details] Patch to fix DB Update related crash Oops. That last patch was backwards. Attaching corrected patch.
(In reply to comment #14) Rock on! Jeff, what is it going to take to get you signed up co-maintaining this package? You obviously care about the package and are keen on working with upstream. If want to get commit access for this package, I'm more than willing to back you up in the sponsorship process to get you the commit access. I'll spin up a new testing package and get it into the que. -jef
(In reply to comment #14) > Created attachment 462811 [details] > Patch to fix DB Update related crash > > Oops. That last patch was backwards. Attaching corrected patch. Jeff: I tried your patch (changing except sqlite3.OperationalError to except sqlalchemy.exc.OperationalError on line 510 of db.py), but got the result below. It looks like the error in converting the database is different, but still there. Sorry. George [ggalt@george noarch]$ gourmet Database older than 0.14.7 -- updating 0.13.4 FAILED TO EXECUTE ALTER TABLE recipe ADD yields FLOAT; Ignoring error in add_column_to_table Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/gourmet/backends/db.py", line 898, in add_column_to_table self.db.execute(sql) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1791, in execute return connection.execute(statement, *multiparams, **params) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1194, in execute params) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1290, in _execute_text return self.__execute_context(context) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1305, in __execute_context context.parameters[0], context=context) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1404, in _cursor_execute context) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1397, in _cursor_execute context) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 299, in do_execute cursor.execute(statement, parameters) OperationalError: (OperationalError) duplicate column name: yields 'ALTER TABLE recipe ADD yields FLOAT;' () FAILED TO EXECUTE ALTER TABLE recipe ADD yield_unit VARCHAR(32); Ignoring error in add_column_to_table Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/gourmet/backends/db.py", line 898, in add_column_to_table self.db.execute(sql) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1791, in execute return connection.execute(statement, *multiparams, **params) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1194, in execute params) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1290, in _execute_text return self.__execute_context(context) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1305, in __execute_context context.parameters[0], context=context) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1404, in _cursor_execute context) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1397, in _cursor_execute context) File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 299, in do_execute cursor.execute(statement, parameters) OperationalError: (OperationalError) duplicate column name: yield_unit 'ALTER TABLE recipe ADD yield_unit VARCHAR(32);' () Database older than 0.14.0 -- updating 0.13.4 Making a backup copy of DB in /home/ggalt/.gourmet/recipes.db.backup-25-11-10 You can use it to restore if something ugly happens. Upgrade from < 0.14 0.13.4 Attempting to alter categories <bound method RecipeManager.setup_category_table of <gourmet.backends.db.RecipeManager instance at 0x1d8c488>> {'id': 'recipe_id'} ['category'] Traceback (most recent call last): File "/usr/bin/gourmet", line 35, in <module> gourmet.GourmetRecipeManager.startGUI() File "/usr/lib/python2.7/site-packages/gourmet/GourmetRecipeManager.py", line 715, in startGUI r=RecGui(splash_label=splash.label) File "/usr/lib/python2.7/site-packages/gourmet/GourmetRecipeManager.py", line 918, in __init__ GourmetApplication.__init__(self, splash_label=splash_label) File "/usr/lib/python2.7/site-packages/gourmet/GourmetRecipeManager.py", line 114, in __init__ self.setup_recipes() # Setup recipe database File "/usr/lib/python2.7/site-packages/gourmet/GourmetRecipeManager.py", line 204, in setup_recipes self.rd = recipeManager.default_rec_manager() File "/usr/lib/python2.7/site-packages/gourmet/recipeManager.py", line 131, in default_rec_manager return get_recipe_manager(**dbargs) File "/usr/lib/python2.7/site-packages/gourmet/recipeManager.py", line 126, in get_recipe_manager return RecipeManager(**args) File "/usr/lib/python2.7/site-packages/gourmet/backends/db.py", line 1760, in __init__ RecData.__init__(self,*args,**kwargs) File "/usr/lib/python2.7/site-packages/gourmet/backends/db.py", line 165, in __init__ self.update_version_info(gourmet.version.version) File "/usr/lib/python2.7/site-packages/gourmet/backends/db.py", line 510, in update_version_info except sqlite3.exc.OperationalError: NameError: global name 'sqlite3' is not defined
Looks like you may have mis-applied that patch. You have: sqlite3.exc.OperationalError: Should be: sqlalchemy.exc.OperationalError: -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers
(In reply to comment #17) > Looks like you may have mis-applied that patch. > You have: sqlite3.exc.OperationalError: > Should be: sqlalchemy.exc.OperationalError: > > > > -- > Fedora Bugzappers volunteer triage team > https://fedoraproject.org/wiki/BugZappers Jeff: Your absolutely right. I figured a one-line patch was easier to do in an editor and I blew it. Corrected the line as you suggested and it works now!! Thanks to both you and Jef for the extensive and speedy help! George
Watch F13 and F14 updates-testing repo for gourmet-0.15.6-3 which has both patches included to deal with this old db compatibility. To help this get out to users, it would be groovy if you would +1 the karma at http://admin.fedoraproject.org/updates/gourmet-0.15.6-3.fc13 and http://admin.fedoraproject.org/updates/gourmet-0.15.6-3.fc14 -jef
(In reply to comment #19) > Watch F13 and F14 updates-testing repo for gourmet-0.15.6-3 which has both > patches included to deal with this old db compatibility. > > To help this get out to users, it would be groovy if you would +1 the karma at > http://admin.fedoraproject.org/updates/gourmet-0.15.6-3.fc13 > and > http://admin.fedoraproject.org/updates/gourmet-0.15.6-3.fc14 > > -jef Jef: I'd be happy to do so, but I'm not sure how. I've searched google, but no luck. The only thing I find is something about using fedora-easy-karma, but it doesn't seem to do anything for me. George
(In reply to comment #20) ... > I'd be happy to do so, but I'm not sure how. I've searched google, but no > luck. The only thing I find is something about using fedora-easy-karma, but it > doesn't seem to do anything for me. > > George Click the 'Add a comment >>' link at the bottom of the 'update' page (the links were provided in comment 19). You will then be prompted for comments and a rating (Untested=0, Works for me=+1, Does not work=-1). See the "What to test, testing, and reporting results" section @ [1] for a better explanation. (But note that a FAS account is not required to provide this feedback.) 1:http://fedoraproject.org/wiki/QA/Updates_Testing -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers
gourmet-0.15.6-4.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.
gourmet-0.15.9-1.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/gourmet-0.15.9-1.fc13
gourmet-0.15.9-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.