On Aug 21, 2008, at 5:02 AM, William Temperley wrote:
> >> >> It looks pretty clear that this is a Django error. It's calling >> str(s) which will fail for a unicode object which contains multibyte >> characters, which would be the case for a UTF-8 encoded string >> converted to unicode by SQLAlchemy.. >> > > It clearly isn't a Django error! > > Python Shell: >>>> Source.metadata.create_all(engine) >>>> results = session.query(Source).all() >>>> results > > Gives the same errors. > > I think SQLAlchemy is returning non UTF8 strings here. This happens in > a python shell, an IPython shell (with no Django anywhere). > one thing to note is that SQLA has no capability to return a "non- UTF8" string. It either returns the string data as received from the database, with whatever encoding that string happens to be in, or it returns a python unicode object. It's the latter case that calling str() on an attribute will fail, if the unicode object contains characters which are not representable in ASCII. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" 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/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
