-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm not getting
Traceback (most recent call last):
File
"/home/gerhard/ghpy/2.4/site-packages/CherryPy-2.2.0-py2.4.egg/cherrypy/_cphttptools.py",
line 104, in _run
applyFilters('before_main')
File
"/home/gerhard/ghpy/2.4/site-packages/CherryPy-2.2.0-py2.4.egg/cherrypy/filters/__init__.py",
line 151, in applyFilters
method()
File
"/home/gerhard/ghpy/2.4/site-packages/TurboGears-0.9a4-py2.4.egg/turbogears/visit.py",
line 163, in before_main
plugin.record_request( visit )
File
"/home/gerhard/ghpy/2.4/site-packages/TurboGears-0.9a4-py2.4.egg/turbogears/identity/visitor.py",
line 158, in record_request
identity= self.identity_from_request(visit.id)
File
"/home/gerhard/ghpy/2.4/site-packages/TurboGears-0.9a4-py2.4.egg/turbogears/identity/visitor.py",
line 86, in identity_from_request
identity= source(visit_id)
File
"/home/gerhard/ghpy/2.4/site-packages/TurboGears-0.9a4-py2.4.egg/turbogears/identity/visitor.py",
line 141, in identity_from_form
identity= self.provider.validate_identity( user_name, pw, visit_id )
File
"/home/gerhard/ghpy/2.4/site-packages/TurboGears-0.9a4-py2.4.egg/turbogears/identity/soprovider.py",
line 194, in validate_identity
user= user_class.byUserId( user_name )
File "<string>", line 1, in <lambda>
File
"/home/gerhard/ghpy/2.4/site-packages/SQLObject-0.7.1dev_r1675-py2.4.egg/sqlobject/main.py",
line 1266, in _SO_fetchAlternateID
result, obj = cls._findAlternateID(name, dbName, value, connection)
File
"/home/gerhard/ghpy/2.4/site-packages/SQLObject-0.7.1dev_r1675-py2.4.egg/sqlobject/main.py",
line 1262, in _findAlternateID
value), None
File
"/home/gerhard/ghpy/2.4/site-packages/SQLObject-0.7.1dev_r1675-py2.4.egg/sqlobject/dbconnection.py",
line 587, in _SO_selectOneAlt
return self.queryOne("SELECT %s FROM %s WHERE %s = %s" %
File
"/home/gerhard/ghpy/2.4/site-packages/SQLObject-0.7.1dev_r1675-py2.4.egg/sqlobject/dbconnection.py",
line 755, in queryOne
return self._dbConnection._queryOne(self._connection, s)
File
"/home/gerhard/ghpy/2.4/site-packages/SQLObject-0.7.1dev_r1675-py2.4.egg/sqlobject/dbconnection.py",
line 341, in _queryOne
self._executeRetry(conn, c, s)
File
"/home/gerhard/ghpy/2.4/site-packages/SQLObject-0.7.1dev_r1675-py2.4.egg/sqlobject/dbconnection.py",
line 297, in _executeRetry
return cursor.execute(query)
TypeError: argument 1 must be str, not unicode
I debugged this a little, and the reason is that the username gets passed as
Unicode string, and then SQLObject does something like
"SELECT %s FROM %s WHERE %s = %s" % (...) where Unicode strings get put into a
bytestring and the result is a Unicode string. Finally, psycopg chokes on the
Unicode string.
This didn't happen in the 0.9trunk versions I used to use. Did something
change? That form fields are now Unicode strings, for example? Or did SQLObject
get a new bug?
- -- Gerhard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFENvIydIO4ozGCH14RAoEVAJ4371WfYEkHGRDneAiNcp2g5hZohgCfXmSy
8176DEuKK2/PmAKrWCVV7jM=
=qisc
-----END PGP SIGNATURE-----
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---