Bugs item #2865000, was opened at 2009-09-23 15:26
Message generated for change (Tracker Item Submitted) made by gregor_horvath
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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: greg (gregor_horvath)
Assigned to: Nobody/Anonymous (nobody)
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
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540672&aid=2865000&group_id=74338
|