Skip to content

[upgrade 0.13.8->0.15.x] TypeError: an integer is required #678

Closed

Description

@ockham

This is related to previous Metakit -> SQLite -> SQLAlchemy upgrades that didn't convert (at least) some "pickled" booleans and that's biting many users now, see e.g.

Normally, this error looks about like
sqlite:////home/user/.gourmet/recipes.db
TRYING TO GET ingkey pantry from pantry
ERROR!!!
Traceback (most recent call last):
File "/usr/share/gourmet/gourmet/backends/db.py", line 2027, in items
val = getattr(i,self.vp)
TypeError: an integer is required
IGNORING
[...]
sqlalchemy.exc.IntegrityError: (IntegrityError) column ingkey is not unique u'INSERT INTO pantry (ingkey, pantry) VALUES (?, ?)' ((u'oil, olive', 1), (u'black pepper, ground', 1), (u'flour, all purpose', 1), (u'ice', 1), (u'sugar', 1), (u'water', 1), (u'oil, vegetable', 1), (u'salt', 1))

Activity

  1. ghost assigned on Feb 1, 2013
  2. ockham commented on Feb 1, 2013

    @ockham
    CollaboratorAuthor

    The obvious culprit is the pantry column in the pantry table (which holds pickled Booleans), as examining two of the recipes.db files from the downstream bug trackers reveals. Fixing this is quite straight-forward and almost done.
    There's however also the shopcategory column in the shopcats table which holds pickled strings, and that's a bit more complicated to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions