On Aug 20, 2008, at 6:09 PM, William Temperley wrote:
> It happens when I do this in a python shell - I'm just printing the > __repr__: > > Source.metadata.create_all(engine) > results = session.query(Source).all() > results > > line 31, in _dec > args[0] = force_unicode(args[0]) > File "/usr/lib/python2.5/site-packages/django/utils/encoding.py", > line 51, in force_unicode > s = unicode(str(s), encoding, errors) > UnicodeEncodeError: 'ascii' codec can't encode character u'\xe2' in > position 142: ordinal not in range(128) 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.. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
