When I try to update a row using ORM in the following way, it shows the
following error:
InterfaceError: (InterfaceError) Error binding parameter 0 - probably
unsupported type. u'UPDATE table_name SET unicode_col=?, int_col=?
WHERE table_name.id = ?' ((u'abcd',), 1, 2)
I suspect the problem is that the value corresponding to unicode_col is
(u'abcd',) as opposed to a simple u'abcd'.
Here is how I update the database:
1) I first query it and obtain an object representing the row that I need
--> file_row
2) I perform some checks and change the values --> file_row.int_col = 1
followed by file_row.unicode_col = u"abcd"
3) I call commit on the session
I am pretty sure the problem is not the original type of value of the
unicode_col since the following succeeds without error:
query(TableName).filter(TableName.id == file_row.id).update({'unicode_col':
u"abcd", 'int_col': 1})
Any idea how to fix the error?
Thanks
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.