[sqlalchemy] Re: setattr and mapped ORM

2009-10-24 Thread laurent FRANCOIS
On Wed, 2009-10-21 at 09:24 -0700, David Gardner wrote: Using setattr() shouldn't be a problem, however the __dict__ attribute also has other things in there like _sa_instance_state that I don't believe you want to copy to the new item. Try this instead: for col in object_mapper(update):

[sqlalchemy] Re: setattr and mapped ORM

2009-10-24 Thread laurent FRANCOIS
On Wed, 2009-10-21 at 09:24 -0700, David Gardner wrote: Using setattr() shouldn't be a problem, however the __dict__ attribute also has other things in there like _sa_instance_state that I don't believe you want to copy to the new item. Try this instead: for col in object_mapper(update):

[sqlalchemy] Re: can't import ARRAY from dialects.postgresql

2009-10-24 Thread sector119
The latest trunk. from sqlalchemy.dialects.postgresql import ARRAY Traceback (most recent call last): File console, line 1, in module ImportError: cannot import name ARRAY from sqlalchemy.dialects.postgresql.base import ARRAY from sqlalchemy.dialects import postgresql 'ARRAY' in

[sqlalchemy] UnicodeDecodeError with pg8000 postgresql.conf client_encoding=utf8, engine encoding=utf-8

2009-10-24 Thread sector119
Hi All. I've got UnicodeDecodeError: 'ascii' codec can't decode byte 0xa1 in position 3: ordinal not in range(128) Why it can happen? I use client_encoding=utf8 at postgresql.conf and encoding=utf-8 at create_engine. File 'string', line 2 in submit File

[sqlalchemy] Re: can't import ARRAY from dialects.postgresql

2009-10-24 Thread Michael Bayer
its missing. use sqlalchemy.dialects.postgresql.base.ARRAY. On Oct 24, 2009, at 6:19 AM, sector119 wrote: The latest trunk. from sqlalchemy.dialects.postgresql import ARRAY Traceback (most recent call last): File console, line 1, in module ImportError: cannot import name ARRAY from