How Python interprets this concatenation if self_error is enconded with something different of self.sql?
the error is at this concatenation in dException self.err_desc + '\nSQL: ' + self.sql If I do print 'err_desc:',self.err_desc print 'Sql:',self.sql there is no problem, but print self.err_desc + u'\nSQL: ' + self.sql alert in same way about coding... On 5/23/08, Jorge Mota <[EMAIL PROTECTED]> wrote: > > I am in the correct way (I think) > > changed at dException: > > class DBQueryException(DatabaseException): > def __init__(self, err, sql): > self.sql = sql > > self.err_desc = "%s" % err > > def __str__(self): > #return self.err_desc + '\nSQL: ' + self.sql > return self.sql > > Without the error description in unicode the error disappear :) > > On 5/23/08, Jorge Mota <[EMAIL PROTECTED]> wrote: >> >> I think the error is not at dException. >> >> because I can print self.err_desc >> >> and self.sql with out problems >> >> I think the error is at >> >> dbActivityLog.write() cannot process the unicode string. >> >> Best regards >> >> On 5/23/08, Ed Leafe <[EMAIL PROTECTED]> wrote: >>> >>> On May 23, 2008, at 2:44 PM, Jorge Mota wrote: >>> >>> > same error :( >>> >>> >>> OK, it was a long shot. Let me dig into it more and I'll get back >>> to >>> you. >>> >>> >>> -- Ed Leafe >>> >>> >>> >>> >>> [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev Searchable Archives: http://leafe.com/archives/search/dabo-dev This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]
