Bugs item #2865000, was opened at 2009-09-23 17:26
Message generated for change (Settings changed) made by phd
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2865000&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: SQLObject release (specify)
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: greg (gregor_horvath)
>Assigned to: Oleg Broytmann (phd)
Summary: UnicodeEncodeError with ?debug=1 and unciode query
Initial Comment:
If in the connection string ?debug=1 is enabled and the select query is unicode, then a UnicodeEncodeError is thrown:
File "/usr/lib/python2.5/site-packages/sqlobject/sresults.py", line 179, in __iter__
return iter(list(self.lazyIter()))
File "/usr/lib/python2.5/site-packages/sqlobject/sresults.py", line 187, in lazyIter
return conn.iterSelect(self)
File "/usr/lib/python2.5/site-packages/sqlobject/dbconnection.py", line 395, in iterSelect
select, keepConnection=False)
File "/usr/lib/python2.5/site-packages/sqlobject/dbconnection.py", line 633, in __init__
dbconn.printDebug(rawconn, self.query, 'Select')
File "/usr/lib/python2.5/site-packages/sqlobject/dbconnection.py", line 324, in printDebug
self.debugWriter.write(msg)
File "/usr/lib/python2.5/site-packages/sqlobject/dbconnection.py", line 35, in write
self.logfile.write(text + '\n')
UnicodeEncodeError: 'ascii' codec can't encode character u'\xd6' in position 56: ordinal not in range(128)
See in the attachment a test case wich demonstrates the error case and the ok case.
Tested on Version 0.10.2
----------------------------------------------------------------------
>Comment By: Oleg Broytmann (phd)
Date: 2009-09-25 18:52
Message:
Fixed in the revisions 3992-3994 (branches 0.10, 0.11 and the trunk). Will
be in the next round of releases. Thank you!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2865000&group_id=74338
|