I think this is DB-API problem? 0.9a4: [EMAIL PROTECTED]:/www/tg$ tg-admin shell Python 2.4.1 (#2, May 6 2005, 11:22:24) [GCC 3.3.6 (Debian 1:3.3.6-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> TG_User.byUserId(u"rob") <TG_User 1 userId=u'rob' emailAddress="u'[EMAIL PROTECTED]'" displayName=u'Robin Haswell' password="u'83e1cf260997ff7...'" created='datetime.datetime...)'> >>>
That's probably as straight-up TG identity as is possible. [EMAIL PROTECTED]:/www/tg$ mysql -V mysql Ver 12.22 Distrib 4.0.24, for pc-linux-gnu (x86_64) Oooh I forgot this machine was 64bit. Shame about MySQL version. Damn Debian. [EMAIL PROTECTED]:/www/tg$ aptitude show python2.4-mysqldb Package: python2.4-mysqldb State: installed Automatically installed: no Version: 1.2.1c2-1 Priority: optional Section: python Maintainer: Jonas Meurer <[EMAIL PROTECTED]> Uncompressed Size: 238k Depends: libc6 (>= 2.3.2.ds1-21), libmysqlclient12, zlib1g (>= 1:1.2.1), python2.4 Suggests: python2.4-egenix-mxdatetime, mysql-server Description: A Python interface to MySQL MySQLdb is an interface to the popular MySQL database server for Python. The design goals are: + Compliance with Python database API version 2.0 + Thread-safety + Thread-friendliness (threads will not block each other) + Compatibility with MySQL-3.22 and later This is the Python 2.4 version of the package. -Rob Kevin Dangoor wrote: > I'm crossposting to the SQLObject list, because I'm certain that Oleg > or Ian will likely find a hole in my suggestion. > > On 4/18/06, Jason Chu <[EMAIL PROTECTED]> wrote: >> I'm in the midst of trying to deploy our first public release and I'm >> running into a problem that has been mentioned before. > > I'm certain we can find a solution, let's see how optimal we can make it. > >> Every time I try to log in, the byUserId (or by_user_name) query >> generated by identity fails with this traceback: >> >> Traceback (most recent call last): > [SNIP!] >> "/home/jchu/coding/sqlobject/trunk/sqlobject/dbconnection.py", line >> 306, in _executeRetry return cursor.execute(query) TypeError: argument >> 1 must be str, not unicode >> >> I am using sqlobject 0.8 dev in both cases, but my understanding is >> that the sqlobject by* methods don't like unicode, even though all of >> our strings are unicode everywhere. > > My suggestion here is that the by* methods should call the column's > validator.from_python method. In the case of a UnicodeCol, this would > do the proper encoding. In the case of something like a PickleCol, the > request value would get pickled before comparison. > > It seems to make sense to me. > > Kevin > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

