This is a really strange bug that I'm currently running into as well.
The reason it's strange is because when I was using SQLObject and
CherryPy before I even tried out TurboGears, I had no problems with the
same rows that are now giving me trouble.  And I looked at the line in
dbconnection.py that's supposedly raising the error, it's the same in
both the TurboGears distribution and the version I was using.

Something is apparently calling str() on a unicode field when it's
being inserted.  There is a way around it, it seems: make the column
accept None, then update it with the unicode value later on:

Table.uniField = UnicodeCol(default=None)

...

Table(uniField=None, ...)

...

Table.uniField = stringThatCausedProblemBefore
(or)
Table.set(uniField=stringThatCausedProblemBefore)

Reply via email to