.set() converts fields to backend format using validators attached to
the fields. UnicodeColumns are encoded to strings, but StringColumns are
not, so when you've assigned a unicode object to a StringCol
._SO_update() received that unicode object which is wrong -
._SO_update() has to receive str. Do not assign unicode to StringCol.


Hmm... I am not getting it.

I am on the Firebird.
The database Default character set = UTF8
ALL text fields in in the table are varchar.
Why the SQLObject things some columns are UnicodeColumns and some columns are StringColumns?

Bingo... it looks like "Mea Culpa":

Because of my laziness I am using fromDatabase = True.
But now, when I have inspected the table definitions, I have found I am (accidentally) mixing two things together in one of the class/tables definition (see the code bellow).
I will investigate this.

Thanks a lot.

Petr

class ProdejniMista(SQLObject):
    class sqlmeta:
        fromDatabase = True # -> nacte vse z databaze bez potreby definice   
#        columnList = True  
    provozovatelMista = ForeignKey('ProvozovatelMista')
    automaty = RelatedJoin('Automaty')
    produkty = RelatedJoin('Produkty')
    nazevProdejnihoMista = UnicodeCol(dbEncoding = "utf-8")
    kontaktniOsobaJmeno = UnicodeCol(dbEncoding = "utf-8")
    kontaktniOsobaPrijmeni = UnicodeCol(dbEncoding = "utf-8")
    mesto = UnicodeCol(dbEncoding = "utf-8")
    adresa1 = UnicodeCol(dbEncoding = "utf-8")
    adresa2 = UnicodeCol(dbEncoding = "utf-8")
    psc = UnicodeCol(dbEncoding = "utf-8")
    zemDelka = UnicodeCol(dbEncoding = "utf-8")
    zemSirka = UnicodeCol(dbEncoding = "utf-8")
    telReseniPoruchy = UnicodeCol(dbEncoding = "utf-8")
    telKontaktniOsoby = UnicodeCol(dbEncoding = "utf-8")
    telKontaktniOsoby = UnicodeCol(dbEncoding = "utf-8")
    automaty = RelatedJoin('Automaty')