On Jan 18, 2010, at 10:00 AM, Tomas Zulberti wrote:
> Hi. I have the following error while making a query using the models:
> raise exc.DBAPIError.instance(statement, parameters, e,
> connection_invalidated=is_disconnect)
> ProgrammingError: (ProgrammingError) can't adapt
> 'UPDATE data_items SET content=%(content)s WHERE data_items.serial_id
> = %(data_items_serial_id)s' {'content': 'Programas de publicidad -
> Soluciones Empresariales - Todo acerca de Google - Google.com in
> English \xc2\xa92010 - Privacidad', 'data_item_serial_id': 3225L}
>
> The model for that class is:
> class DocData(Base):
> serial_id = Column(Integer, ForeignKey('items.serial_id',
> ondelete='cascade'), primary_key=True)
> content = Column(UnicodeText)
>
> and the database is:
>
> CREATE TABLE doc_datas
> (
> serial_id integer NOT NULL,
> "content" text,
> )
> WITH (OIDS=FALSE);
>
>
>
> The content is unicode, so I don't understand why the exception is
> raised...
>
> Thanks in advance,
> Tomas Zulberti
>
> pd: I am using sqlalchemy 0.5.8.
you likely want to set the client encoding of your PG database to utf-8.
> --
> 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.
>
>
--
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.