Problems creating new recipes

Anonymous
2010-09-30
2013-05-14

  • Anonymous
    2010-09-30

    Hi,

    I have the following problem always i try to create a new recipe:

    /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(),**{}),
    Problem adding recipe with dictionary...
    KEY: deleted of type <type 'str'> VALUE: False of type <type 'bool'>
    KEY: last_modified of type <type 'str'> VALUE: 1285850033.82 of type <type 'float'>
    KEY: title of type <type 'str'> VALUE: Nueva receta of type <type 'unicode'>
    Traceback (most recent call last):
      File "/usr/lib/python2.6/site-packages/gourmet/GourmetRecipeManager.py", line 1122, in show
        rc=reccard.RecCard(self)
      File "/usr/lib/python2.6/site-packages/gourmet/reccard.py", line 69, in __init__
        recipe = self.rg.rd.new_rec()
      File "/usr/lib/python2.6/site-packages/gourmet/backends/db.py", line 1400, in new_rec
        return self.add_rec(blankdict)
      File "/usr/lib/python2.6/site-packages/gourmet/backends/db.py", line 1163, in add_rec
        ret = self.do_add_rec(dic)
      File "/usr/lib/python2.6/site-packages/gourmet/backends/db.py", line 1288, in do_add_rec
        select = self.recipe_table.select(self.recipe_table.c.id==insert_statement.execute(**rdict).lastrowid)
      File "/usr/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 2310, in lastrowid
        return self.cursor.lastrowid
    AttributeError: 'NoneType' object has no attribute 'lastrowid'
    Traceback (most recent call last):
      File "/usr/lib/python2.6/site-packages/gourmet/GourmetRecipeManager.py", line 210, in autosave
        self.rd.save()
      File "/usr/lib/python2.6/site-packages/gourmet/backends/db.py", line 218, in save
        self.db.commit()
      File "/usr/lib/python2.6/site-packages/sqlalchemy/engine/threadlocal.py", line 78, in commit
        trans = self._connections.trans.pop(-1)
    IndexError: pop from empty list
    

    The program freeze. Im using 0.15.4, but i have the same problem with 0.15.6.

    Thanks in advance and excuse my bad English

     
  • Jeff Raber
    Jeff Raber
    2010-12-04

    Congratulations!  It looks like you hit two bugs at the same time.  ;)
    Both are caused by fairly recent changes in sqlalchemy and patches are have been submitted.  If you're so inclined, you can checkout the latest version of the source and apply this patch https://sourceforge.net/tracker/?func=detail&aid=3124276&group_id=108118&atid=649654

    Otherwise, you'll need to wait for the next release that will contain those fixes.