gourmet crashes upon start - Database Connection failed.

Bug #325798 reported by souplin
6
Affects Status Importance Assigned to Milestone
gourmet (Debian)
Unknown
Unknown
gourmet (Ubuntu)
Fix Committed
High
Unassigned

Bug Description

Binary package hint: gourmet

Description: Ubuntu jaunty (development branch)
Release: 9.04
gourmet 0.14.2-1

Seems to be the bug reported here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=507382

gourmet doesn't start anymore with
python-pysqlite2 >=2.5.0

Connecting to file /home/souplin/.gourmet/recipes.db
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "shopcats.ingkey"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "shopcats.shopcategory"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "keylookup.word"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "keylookup.item"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "keylookup.ingkey"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "shopcatsorder.shopcategory"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "recipe.title"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "recipe.instructions"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "recipe.modifications"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "recipe.cuisine"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "recipe.description"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "recipe.source"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "recipe.link"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "ingredients.unit"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "ingredients.item"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "ingredients.ingkey"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "ingredients.inggroup"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "categories.category"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "plugin_info.plugin"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "plugin_info.plugin_version"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
/var/lib/python-support/python2.5/sqlalchemy/databases/sqlite.py:489: SADeprecationWarning: Using String type with no length for CREATE TABLE is deprecated; use the Text type explicitly for column "pantry.ingkey"
  colspec = self.preparer.format_column(column) + " " + column.type.dialect_impl(self.dialect, _for_ddl=column).get_col_spec()
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 1114, 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 201, 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 1572, 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 1428, 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 606, in fetch_one
    return table.select(*make_simple_select_arg(criteria,table)).execute().fetchone()
  File "/var/lib/python-support/python2.5/sqlalchemy/sql/expression.py", line 1087, in execute
    return e.execute_clauseelement(self, multiparams, params)
  File "/var/lib/python-support/python2.5/sqlalchemy/engine/base.py", line 1219, in execute_clauseelement
    return connection.execute_clauseelement(elem, multiparams, params)
  File "/var/lib/python-support/python2.5/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.5/sqlalchemy/engine/base.py", line 907, in _execute_compiled
    self.__execute_raw(context)
  File "/var/lib/python-support/python2.5/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.5/sqlalchemy/engine/base.py", line 960, in _cursor_execute
    self._handle_dbapi_exception(e, statement, parameters, cursor)
  File "/var/lib/python-support/python2.5/sqlalchemy/engine/base.py", line 942, in _handle_dbapi_exception
    raise exceptions.DBAPIError.instance(statement, parameters, e, connection_invalidated=is_disconnect)
sqlalchemy.exceptions.ProgrammingError: (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. u'SELECT keylookup.id, keylookup.word, keylookup.item, keylookup.ingkey, keylookup.count \nFROM keylookup \nWHERE keylookup.ingkey = ? AND keylookup.item = ?' ['Kohlr\xc3\xbcbe', 'Kohlr\xc3\xbcbe']

ProblemType: Crash
Architecture: i386
DistroRelease: Ubuntu 9.04
ExecutablePath: /usr/bin/gourmet
InterpreterPath: /usr/bin/python2.5
NonfreeKernelModules: nvidia
Package: gourmet 0.14.2-1
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/gourmet
ProcEnviron:
 SHELL=/bin/bash
 LANG=de_DE.UTF-8
PythonArgs: ['/usr/bin/gourmet']
SourcePackage: gourmet
Title: gourmet crashed with ProgrammingError in _handle_dbapi_exception()
Uname: Linux 2.6.28-6-generic i686
UserGroups: admin audio cdrom floppy games haldaemon polkituser pulse pulse-access pulse-rt staff sudo users video voice

Tags: apport-crash
Revision history for this message
souplin (klage) wrote :
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Thank you for reporting this error. It's already fixed in 0.14.3 which is currently in Debian unstable. I'd request a sync, but upstream is up to 0.14.5 now and I'd rather release that to unstable and sync then.

Changed in gourmet:
importance: Undecided → High
status: New → Fix Committed
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Well, I'll probably request a sync nonetheless. Who knows when I'll get around to packaging 0.14.5.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

sync from debian should probably happen in the next few days, see bug 326013. In fact, I'll mark this bug as a dupe so that both get closed at the same time.

Revision history for this message
souplin (klage) wrote :

Sorry don't know if I should open this as a new bug:

Snyc from debian fixed the bug - but now with version 14.5.-2ubuntu1 I can either install gourmet or miro. There seems to be a conflict between python-sqlalchemy and python-pysqlite2.

apt-get install gourmet:
Reading Package Lists... Done
Building Dependency Tree... Done

The following packages will be REMOVED:
miro python-pysqlite2

The following NEW packages will be installed:
gourmet python-sqlalchemy

2) Python 2.6 incompatibility (2.5 runs fine):

/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

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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