gourmet does not start on jaunty

Bug #352678 reported by DSHR
78
This bug affects 6 people
Affects Status Importance Assigned to Milestone
gourmet (Ubuntu)
Fix Released
High
Jamie Strandboge
Jaunty
Fix Released
High
Jamie Strandboge
Karmic
Fix Released
High
Jamie Strandboge

Bug Description

Binary package hint: gourmet

Gourmet does not start on fully updated jaunty:

~$ gourmet
/usr/share/gourmet/gourmet/gtk_extras/thumbnail.py:1: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import Image, urllib, md5, os.path, os, StringIO
Traceback (most recent call last):
  File "/usr/bin/gourmet", line 13, in <module>
    from gourmet.OptionParser import *
  File "/usr/share/gourmet/gourmet/__init__.py", line 12, in <module>
    import convert
  File "/usr/share/gourmet/gourmet/convert.py", line 754, in <module>
    FRACTION_MATCHER = re.compile(NUM_AND_FRACTION_REGEXP,re.UNICODE)
  File "/usr/lib/python2.6/re.py", line 190, in compile
    return _compile(pattern, flags)
  File "/usr/lib/python2.6/re.py", line 238, in _compile
    raise ValueError('Cannot process flags argument with a compiled pattern')
ValueError: Cannot process flags argument with a compiled pattern

ProblemType: Crash
Architecture: i386
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/bin/gourmet
InterpreterPath: /usr/bin/python2.6
Package: gourmet 0.14.5-2ubuntu1
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/gourmet
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=de_DE.UTF-8
PythonArgs: ['/usr/bin/gourmet']
SourcePackage: gourmet
Title: gourmet crashed with ValueError in _compile()
Uname: Linux 2.6.28-11-generic i686
UserGroups: adm admin boso6a cdrom dialout lpadmin plugdev sambashare sudo

Revision history for this message
DSHR (s-heuer) wrote :
Rolf Leggewie (r0lf)
Changed in gourmet:
importance: Undecided → High
status: New → Confirmed
DSHR (s-heuer)
visibility: private → public
Revision history for this message
JMarc D. (shadowcjm35) wrote :

I have the same problem after upgrading 8.10 to 9.04 (not fresh install).

Revision history for this message
Charlene Barina (charlener) wrote :

Oddly enough, I *thought* had the same problem - when starting from applications menu it would crash, but typing in "gourmet" in terminal loaded it up fine.

Revision history for this message
DSHR (s-heuer) wrote :

That did not work for me, what seems to work ist use Python 2.5 for gourmet:

$ python2.5 /usr/bin/gourmet

Revision history for this message
kseise (kevin-seise) wrote :

Using DSHR suggestion of "$ python2.5 /usr/bin/gourmet" works, but I get reports of the program crashing, but when I hit close, it stays open and seems to function OK. Really weird behavior.

Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

yes - I confirm this same behavior with .14.5 from the ubuntu repo, as well as .14.7 from upstream. Typing gourmet in the terminal appears to make it load, but it doesn't work correctly, and generates errors in the terminal session.

Revision history for this message
Thomas M. Hinkle (thomas-hinkle) wrote :

guitara/kseise,

There are a number of errors that have always been generated at the terminal with Gourmet -- these aren't high priority and don't trigger any bigger problems, but they aren't things you would have seen running Gourmet from the menu so they'd appear to be new to you.

It's also possible that if ubuntu's traceback-catching bug reporter is active (apport?), it is calling some of these not-really-a-problem error messages "crashes", etc.

Without seeing the error messages, my assumption is that these are unrelated to the real problem, which is an incompatibility with python2.6, which I'll fix just as soon as I get a chance to install python 2.6 and debug this (unless someone beats me to it and sends along patches!)

Revision history for this message
Toupeiro (toupeiro) wrote :

Confirmed this on a fresh jaunty RC install, fully patched up to date. explicitly launching it with python 2.6 has corrected the issue for me thus far.

Revision history for this message
Ron Carlton (ron-carlton) wrote :

fresh jaunty kubuntu install shows Gourmet splashscreen, but app never appears

Revision history for this message
Yannick (yannick-marcerou) wrote :

Works fine with Python2.5 ($ python2.5 /usr/bin/gourmet). I had the same pb between Gourmet & Miro.

Revision history for this message
Anthony Batchelor (toeknee) wrote :

Installed today for the first time.

* Click the icon, see the splash screen, no application.
* From command line: gourmet, See attachment, no application
* From command line: python2.5 /usr/bin/gourmet, Application Loads! (YAY!)
* From command line: gourmet, Application now loads ???
* Click the icon, see the splash screen, Application now loads.

It looks like there might be a bug in either Gourmet or sqlalchemy that is stopping the DB from being created under python2.6.

Revision history for this message
Florian Diesch (diesch) wrote :

Doesn't work for me, I still get an error when calling gourmet, even if I run it using python2.5 before.

/usr/share/gourmet/gourmet/gtk_extras/thumbnail.py:1: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import Image, urllib, md5, os.path, os, StringIO
Traceback (most recent call last):
  File "/usr/bin/gourmet", line 13, in <module>
    from gourmet.OptionParser import *
  File "/usr/share/gourmet/gourmet/__init__.py", line 12, in <module>
    import convert
  File "/usr/share/gourmet/gourmet/convert.py", line 754, in <module>
    FRACTION_MATCHER = re.compile(NUM_AND_FRACTION_REGEXP,re.UNICODE)
  File "/usr/lib/python2.6/re.py", line 190, in compile
    return _compile(pattern, flags)
  File "/usr/lib/python2.6/re.py", line 238, in _compile
    raise ValueError('Cannot process flags argument with a compiled pattern')
ValueError: Cannot process flags argument with a compiled pattern

gourmet:
  Installed: 0.14.5-2ubuntu1
  Candidate: 0.14.5-2ubuntu1
  Version table:
 *** 0.14.5-2ubuntu1 0
        500 http://de.archive.ubuntu.com jaunty/universe Packages
        100 /var/lib/dpkg/status

Revision history for this message
Saibot Sivad (davis-tobias) wrote :

Update: Clicking Gourmet from the Applications menu would give the startup splash screen and never finalize. I also tried, from command line:
gourmet
/usr/bin/gourmet
Python2.5 /usr/bin/gourmet
This last one worked fine, as did using Python2.6
On a whim, I tried starting Gourmet from the command line again using:
gourmet
And it works fine. It also works fine when clicking in the Applications menu. So it looks like some database initialization needed to be done using Python2.5, but after it was initialized it could be started normally. Thanks.

Revision history for this message
Ron Carlton (ron-carlton) wrote : Re: [Bug 352678] Re: gourmet does not start on jaunty
Download full text (3.8 KiB)

I tried the command line "python2.6 gourmet" and received the
following. Anyone working on the code ought to be able to take this
traceback and determine what was wrong. I still only get the splash
screen.

usr/share/gourmet/gourmet/gtk_extras/thumbnail.py:1:
DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import Image, urllib, md5, os.path, os, StringIO
/var/lib/python-support/python2.6/sqlalchemy/util.py:7:
DeprecationWarning: the sets module is deprecated
  import inspect, itertools, new, operator, sets, sys, warnings,
weakref
Loading gnomeprint failed: trying win
Loading win failed: trying lpr
Connecting to file /home/ron/.gourmet/recipes.db
Traceback (most recent call last):
  File "/usr/bin/gourmet", line 35, in <module>
    gourmet.GourmetRecipeManager.startGUI()
  File "/usr/share/gourmet/gourmet/GourmetRecipeManager.py", line 708,
in startGUI
    r=RecGui(splash_label=splash.label)
  File "/usr/share/gourmet/gourmet/GourmetRecipeManager.py", line 912,
in __init__
    GourmetApplication.__init__(self, splash_label=splash_label)
  File "/usr/share/gourmet/gourmet/GourmetRecipeManager.py", line 114,
in __init__
    self.setup_shopping()
  File "/usr/share/gourmet/gourmet/GourmetRecipeManager.py", line 222,
in setup_shopping
    self.sl = shopgui.ShopGui(self, conv=self.conv)
  File "/usr/share/gourmet/gourmet/shopgui.py", line 29, in __init__
    self.data,self.pantry=self.grabIngsFromRecs([])
  File "/usr/share/gourmet/gourmet/shopgui.py", line 580, in grabIngsFromRecs
    self.sh = recipeManager.DatabaseShopper(lst, self.rg.rd, conv=self.conv)
  File "/usr/share/gourmet/gourmet/recipeManager.py", line 25, in __init__
    shopping.Shopper.__init__(self,lst)
  File "/usr/share/gourmet/gourmet/shopping.py", line 46, in __init__
    self.init_orgdic()
  File "/usr/share/gourmet/gourmet/recipeManager.py", line 38, in init_orgdic
    self.orgdic[k]=v
  File "/usr/share/gourmet/gourmet/backends/db.py", line 1816, in __setitem__
    row = self.db.fetch_one(self.vw,**{self.kp:k})
  File "/usr/share/gourmet/gourmet/backends/db.py", line 623, in fetch_one
    return table.select(*make_simple_select_arg(criteria,table)).execute().fetchone()
  File "/var/lib/python-support/python2.6/sqlalchemy/sql/expression.py",
line 1087, in execute
    return e.execute_clauseelement(self, multiparams, params)
  File "/var/lib/python-support/python2.6/sqlalchemy/engine/base.py",
line 1219, in execute_clauseelement
    return connection.execute_clauseelement(elem, multiparams, params)
  File "/var/lib/python-support/python2.6/sqlalchemy/engine/base.py",
line 895, in execute_clauseelement
    return self._execute_compiled(elem.compile(dialect=self.dialect,
column_keys=keys, inline=len(params) > 1), distilled_params=params)
  File "/var/lib/python-support/python2.6/sqlalchemy/engine/base.py",
line 907, in _execute_compiled
    self.__execute_raw(context)
  File "/var/lib/python-support/python2.6/sqlalchemy/engine/base.py",
line 916, in __execute_raw
    self._cursor_execute(context.cursor, context.statement,
context.parameters[0], context=context)
  File "/var/lib/python-support/python2.6/sqlalchemy/engine/base.py",
line 960, in _cu...

Read more...

Revision history for this message
Thomas M. Hinkle (thomas-hinkle) wrote :

This should now be fixed upstream. I'd appreciate interested parties giving 0.14.8 a try and letting me know how it goes.

https://sourceforge.net/project/showfiles.php?group_id=108118&package_id=159597&release_id=686179

Revision history for this message
Florian Diesch (diesch) wrote :

"Thomas M. Hinkle" <email address hidden> wrote:

> This should now be fixed upstream. I'd appreciate interested parties
> giving 0.14.8 a try and letting me know how it goes.
>
> https://sourceforge.net/project/showfiles.php?group_id=108118&package_id=159597&release_id=686179

Traceback (most recent call last):
  File "/usr/local/bin/gourmet", line 13, in <module>
    from gourmet.OptionParser import *
  File "/usr/share/gourmet/gourmet/__init__.py", line 10, in <module>
    import gglobals
  File "/usr/share/gourmet/gourmet/gglobals.py", line 381, in <module>
    add_icon(os.path.join(imagedir,filename),stock_id,label,modifier,keyval)
  File "/usr/share/gourmet/gourmet/gglobals.py", line 365, in add_icon
    pb = gtk.gdk.pixbuf_new_from_file(file_name)
glib.GError: Failed to open file '/usr/share/gourmet/AddToShoppingList.png': No such file or directory

diesch@scenic:~% dpkg -L gourmet | grep AddToShoppingList.png
/usr/local/share/gourmet/AddToShoppingList.png

   Florian
--
<http://www.florian-diesch.de/>

Revision history for this message
DSHR (s-heuer) wrote :

Same situation here, maybe the package was not reconfigured with prefix /usr/share?

Revision history for this message
Thomas M. Hinkle (thomas-hinkle) wrote :

Odd -- my tests clear out /usr/share/gourmet/ before installing the package, but not /usr/local/share/

Puzzling that got munged up, but obviously it did -- I'll get to fixing it.

Revision history for this message
Thomas M. Hinkle (thomas-hinkle) wrote :

Okay -- I have a fixed .deb posted on the SF page for testing. Thanks for catching the problem so fast!

Revision history for this message
Florian Diesch (diesch) wrote :

"Thomas M. Hinkle" <email address hidden> wrote:

> Okay -- I have a fixed .deb posted on the SF page for testing. Thanks
> for catching the problem so fast!

Works for me. Thank you! :-)

   Florian
--
<http://www.florian-diesch.de/>

Revision history for this message
DSHR (s-heuer) wrote :

I test the fixed .deb:

$ dpkg -l gourmet
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/Fehlgeschl. Konfiguration/
         Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/Halten/R=Neuinst notw/X=beide (Status, Fehler: GROSS=schlecht)
||/ Name Version Beschreibung
+++-==============-==============-============================================
ii gourmet 0.14.8-2 A gtk-based recipe organizer and shopping li

~$ gourmet
Traceback (most recent call last):
  File "/usr/bin/gourmet", line 13, in <module>
    from gourmet.OptionParser import *
  File "/usr/share/gourmet/gourmet/__init__.py", line 12, in <module>
    import convert
  File "/usr/share/gourmet/gourmet/convert.py", line 754, in <module>
    FRACTION_MATCHER = re.compile(NUM_AND_FRACTION_REGEXP,re.UNICODE)
  File "/usr/lib/python2.6/re.py", line 190, in compile
    return _compile(pattern, flags)
  File "/usr/lib/python2.6/re.py", line 238, in _compile
    raise ValueError('Cannot process flags argument with a compiled pattern')
ValueError: Cannot process flags argument with a compiled pattern
~$

Revision history for this message
Thomas M. Hinkle (thomas-hinkle) wrote :

Okay -- fixed it.

For the impatient, just go to convert.py line 752 and remove the re.compile call, yielding...

 NUM_AND_FRACTION_REGEXP = "((?P<int>%s)+\s+)?(?P<frac>%s)"%(NUMBER_START_REGEXP,FRACTION_REGEXP)

Fix is being pushed to upstream git and will be in upstream release shortly (0.14.9)

Revision history for this message
DSHR (s-heuer) wrote :

That seems to fix it!

Didn't test the application any further so far ...

Thanks a lot!

Changed in gourmet (Ubuntu Jaunty):
status: New → Confirmed
Changed in gourmet (Ubuntu Jaunty):
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gourmet - 0.14.5-2ubuntu2

---------------
gourmet (0.14.5-2ubuntu2) karmic; urgency=low

  * force python 2.5. This change should be able to be dropped 0.14.9 and
    later
    - debian/control: use 'XS-Python-Version: 2.5'
    - debian/control: Depends on python2.5
    - debian/rules: Replace all '#!' calls to python with python2.5
    - LP: #352678

 -- Jamie Strandboge <email address hidden> Fri, 03 Jul 2009 21:16:20 -0500

Changed in gourmet (Ubuntu Karmic):
status: Confirmed → Fix Released
Revision history for this message
Jamie Strandboge (jdstrand) wrote :
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

SRU request

1. impact of bug is hig because the package is totally unusable
2. a workaround is implemented in karmic which simply forces gourmet to use python2.5 (see 0.14.5-2ubuntu2). This should be able to be dropped after 0.14.9 is available in the archive.
3. patch is attached
4. TEST CASE: start gourmet, it traces back and won't run
5. regression is very-low as the package is completely unusable

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Uploaded to -proposed

Changed in gourmet (Ubuntu Jaunty):
status: Confirmed → Fix Committed
assignee: nobody → Jamie Strandboge (jdstrand)
Changed in gourmet (Ubuntu Karmic):
assignee: nobody → Jamie Strandboge (jdstrand)
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted gourmet into jaunty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Jamie Strandboge (jdstrand) wrote :
Download full text (4.3 KiB)

With old gourmet (and no ~/.gourmet directory):
$ gourmet
/usr/share/gourmet/gourmet/gtk_extras/thumbnail.py:1: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import Image, urllib, md5, os.path, os, StringIO
/var/lib/python-support/python2.6/sqlalchemy/util.py:7: DeprecationWarning: the sets module is deprecated
  import inspect, itertools, new, operator, sets, sys, warnings, weakref
Connecting to file /home/jamie/.gourmet/recipes.db
Traceback (most recent call last):
  File "/usr/bin/gourmet", line 35, in <module>
    gourmet.GourmetRecipeManager.startGUI()
  File "/usr/share/gourmet/gourmet/GourmetRecipeManager.py", line 708, in startGUI
    r=RecGui(splash_label=splash.label)
  File "/usr/share/gourmet/gourmet/GourmetRecipeManager.py", line 912, in __init__
    GourmetApplication.__init__(self, splash_label=splash_label)
  File "/usr/share/gourmet/gourmet/GourmetRecipeManager.py", line 112, in __init__
    self.setup_recipes() # Setup recipe database
  File "/usr/share/gourmet/gourmet/GourmetRecipeManager.py", line 202, in setup_recipes
    self.rd = recipeManager.default_rec_manager()
  File "/usr/share/gourmet/gourmet/recipeManager.py", line 134, in default_rec_manager
    return get_recipe_manager(**dbargs)
  File "/usr/share/gourmet/gourmet/recipeManager.py", line 129, in get_recipe_manager
    return RecipeManager(**args)
  File "/usr/share/gourmet/gourmet/backends/db.py", line 1648, in __init__
    self.km = keymanager.get_keymanager(rm=self)
  File "/usr/share/gourmet/gourmet/keymanager.py", line 524, in get_keymanager
    return KeyManager(*args,**kwargs)
  File "/usr/share/gourmet/gourmet/keymanager.py", line 40, in __init__
    self.initialize_from_defaults()
  File "/usr/share/gourmet/gourmet/keymanager.py", line 46, in initialize_from_defaults
    self.rm.add_ing_to_keydic(i,key)
  File "/usr/share/gourmet/gourmet/backends/db.py", line 1504, in add_ing_to_keydic
    row = self.fetch_one(self.keylookup_table, item=item, ingkey=key)
  File "/usr/share/gourmet/gourmet/backends/db.py", line 623, in fetch_one
    return table.select(*make_simple_select_arg(criteria,table)).execute().fetchone()
  File "/var/lib/python-support/python2.6/sqlalchemy/sql/expression.py", line 1087, in execute
    return e.execute_clauseelement(self, multiparams, params)
  File "/var/lib/python-support/python2.6/sqlalchemy/engine/base.py", line 1219, in execute_clauseelement
    return connection.execute_clauseelement(elem, multiparams, params)
  File "/var/lib/python-support/python2.6/sqlalchemy/engine/base.py", line 895, in execute_clauseelement
    return self._execute_compiled(elem.compile(dialect=self.dialect, column_keys=keys, inline=len(params) > 1), distilled_params=params)
  File "/var/lib/python-support/python2.6/sqlalchemy/engine/base.py", line 907, in _execute_compiled
    self.__execute_raw(context)
  File "/var/lib/python-support/python2.6/sqlalchemy/engine/base.py", line 916, in __execute_raw
    self._cursor_execute(context.cursor, context.statement, context.parameters[0], context=context)
  File "/var/lib/python-support/python2.6/sqlalchemy/engine/base.py", line 960, in _cursor_execute
    self._handle_dbapi_excep...

Read more...

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gourmet - 0.14.5-2ubuntu1.1

---------------
gourmet (0.14.5-2ubuntu1.1) jaunty-proposed; urgency=low

  * force python 2.5. This should not be needed in 0.14.9 and later
    - debian/control: use 'XS-Python-Version: 2.5'
    - debian/control: Depends on python2.5
    - debian/rules: Replace all '#!' calls to python with python2.5
    - LP: #352678

 -- Jamie Strandboge <email address hidden> Fri, 03 Jul 2009 21:16:20 -0500

Changed in gourmet (Ubuntu Jaunty):
status: Fix Committed → Fix Released
Changed in gourmet (Ubuntu Jaunty):
status: Fix Released → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote :

please don't change bug status without explanation.

Changed in gourmet (Ubuntu Jaunty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.