I'm getting this error even though I have convert_unicode = True and the proper NLS_LANG setting:
SQLError: (NotSupportedError) Variable_TypeByValue(): unhandled data type unicode 'DELETE FROM model_acc_protocol WHERE model_acc_protocol.model_id = :model_id AND model_acc_protocol.acc_protocol_id = :acc_protocol_id AND model_acc_protocol.color = :color' {'model_id': 60, 'color': u'RED', 'acc_protocol_id': u'2001-99'} I know my convert_unicode = True is doing something because it solved others problems before. Somehow it isn't working here. One thing that is different here is that the values u'RED' and u'2001-99' were pulled from the database during the same flush(). In the select statement just before this one these value were bound as 'RED' and '2001-99' instead of unicode. Any ideas? Steve On Apr 25, 1:08 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Apr 25, 2007, at 12:26 PM, kap_ravi wrote: > > > > > Apparently there is some problem with theUNICODEdatathat sqlAlchemy > > sends to oracle from the turbo gears framework. But I have tried the > > same from the python command line with named parameters and its works > > without any issues. > > feeding inunicodestrings requires that they be encoded into > bytestrings first. this can be accomplished by either the usage of > theUnicodetypeon your Column definitions, or by sending the flag > convert_unicode=True to create_engine(). the default encoding for > this flag is utf-8 which can be configured by the 'encoding' flag > sent to create_engine(). > > additionally, when using Oracle, you have to ensure that the > environment variable NLS_LANG is set appropriately, such as "AMERICAN- > AMERICA.UTF8". --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---