Menu

#137 Unicode queries choke

closed-duplicate
nobody
General (125)
5
2006-01-03
2005-12-07
No

Using SQLObject 0.7rc1:

>>> db.Item.select(db.Item.q.title == u'foo').count()
[...]
TypeError: argument 1 must be str, not unicode

Discussion

  • Oleg Broytman

    Oleg Broytman - 2006-01-03
    • status: open --> closed-duplicate
     
  • Oleg Broytman

    Oleg Broytman - 2006-01-03

    Logged In: YES
    user_id=4799

    This is dup for bug N 1243224. .select() and .selectBy()
    require str, not unicode.

    db.Item.select(db.Item.q.title ==
    u'foo'.encode(dbEncoding)).count()

     

Log in to post a comment.