Re: [SQLObject] troubles with unicode

2012-01-29 Thread Petr Jakeš
Finally some small success... It was necessary to define all the column names and column types manually in the table Class definition. Before inserting/updating to the database it is necessary to check, if the inserted value type is the same as declared in the table Class definition (it is not p

Re: [SQLObject] troubles with unicode

2012-01-29 Thread Petr Jakeš
> > = set method start === > > telKontaktniOsoby +420734803579 > > kontaktniOsobaPrijmeni Zburn??k > > nazevKontaktMistaPoruchy recepce > > > > _SO_update start = > > tel_kontaktni_osoby +420734803579 > > kontaktni_osoba_prijmeni Z

Re: [SQLObject] troubles with unicode

2012-01-29 Thread Oleg Broytman
On Sun, Jan 29, 2012 at 11:17:09PM +0100, Petr Jake?? wrote: > File > "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/dbconnection.py", > line 329, in _executeRetry > return cursor.execute(query) > UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in > po

Re: [SQLObject] troubles with unicode

2012-01-29 Thread Petr Jakeš
I thing I am few steps farther but new problem arised: File "/TG_web/fantomas/controllers.py", line 305, in ulozeniProdejnihoMista prodMisto.set(**slovnikArgumentu) File "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/main.py", line 1123, in set self._connection

Re: [SQLObject] troubles with unicode

2012-01-29 Thread Petr Jakeš
> > > .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 t

Re: [SQLObject] troubles with unicode

2012-01-29 Thread Oleg Broytman
On Sun, Jan 29, 2012 at 09:50:01PM +0100, Petr Jake?? wrote: > = set method start === > telKontaktniOsoby +420721870631 > kontaktniOsobaPrijmeni Kra??mar > nazevKontaktMistaPoruchy Vr??tnice [snip] > _SO_update start = > tel_kontaktni

Re: [SQLObject] troubles with unicode

2012-01-29 Thread Petr Jakeš
> The error means there is at least one 8-bit str mixed with unicode. > If you are sure all values are str instances - what about dbNames? > _SO_update is called from set with dbNames from sqlmeta.columns: > >args = [(self.sqlmeta.columns[name].dbName, value) >

Re: [SQLObject] troubles with unicode

2012-01-29 Thread Oleg Broytman
Hello! On Sun, Jan 29, 2012 at 11:06:31AM +0100, Petr Jake?? wrote: > File > "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.egg/sqlobject/main.py", > line 1120, in set > self._connection._SO_update(self, args) > File > "/usr/lib/python2.5/site-packages/SQLObject-0.10.1-py2.5.eg

[SQLObject] troubles with unicode

2012-01-29 Thread Petr Jakeš
I am lost, trying to find solution whole night long. all attempts to call the set method (see bellow) are finishing: Page handler: > Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cphttptools.py", line 121, in _run self.main()