Hi,
 
 I'm using SQLObject 0.7.1b1 and MySQL5 and I have problems with unicode 
strings each time I try to insert or update an object. All my string columns 
are declared as UnicodeCol and I encode all my strings in UTF-8 before setting 
the values.
 Here what I get when updating:
 2006-07-17T17:28:22 ERROR root 
C:\Python24\Lib\site-packages\zope\publisher\publ
 ish.py line 143 in publish
 => 'publication.afterCall(request, object)'
 ** exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in 
positi
 on 59: ordinal not in range(128)
 C:\Python24\Lib\site-packages\zope\app\publication\zopepublication.py line 167 
i
 n afterCall
 => 'txn.commit()'
 ** exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in 
positi
 on 59: ordinal not in range(128)
 C:\Python24\Lib\site-packages\transaction\_transaction.py line 372 in commit
 => 'self._callBeforeCommitHooks()'
 ** exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in 
positi
 on 59: ordinal not in range(128)
 C:\Python24\Lib\site-packages\transaction\_transaction.py line 421 in 
_callBefor
 eCommitHooks
 => 'hook(*args, **kws)'
 ** exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in 
positi
 on 59: ordinal not in range(128)
 c:\ZopeInst\lib\python\sqlos\_transaction.py line 43 in beforeCommitHook
 => 'obj.sync()'
 ** exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in 
positi
 on 59: ordinal not in range(128)
 c:\python24\lib\site-packages\SQLObject-0.7.1b1-py2.4.egg\sqlobject\main.py 
line
  991 in sync
 => 'self.syncUpdate()'
 ** exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in 
positi
 on 59: ordinal not in range(128)
 c:\python24\lib\site-packages\SQLObject-0.7.1b1-py2.4.egg\sqlobject\main.py 
line
  1011 in syncUpdate
 => 'self._connection._SO_update(self, values)'
 ** exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in 
positi
 on 59: ordinal not in range(128)
 
c:\python24\lib\site-packages\SQLObject-0.7.1b1-py2.4.egg\sqlobject\dbconnection
 .py line 563 in _SO_update
 => 'self.query("UPDATE %s SET %s WHERE %s = (%s)" %'
 ** exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in 
positi
 on 59: ordinal not in range(128)
 
 Here what i get when inserting:
 ------
 2006-07-17T17:30:26 ERROR root 
C:\Python24\Lib\site-packages\zope\publisher\publ
 ish.py line 138 in publish
 => 'result = publication.callObject(request, object)'
 ** exceptions.TypeError: __init__() takes exactly 2 arguments (6 given)
 C:\Python24\Lib\site-packages\zope\app\publication\zopepublication.py line 161 
i
 n callObject
 => 'return mapply(ob, request.getPositionalArguments(), request)'
 ** exceptions.TypeError: __init__() takes exactly 2 arguments (6 given)
 C:\Python24\Lib\site-packages\zope\publisher\publish.py line 113 in mapply
 => 'return debug_call(object, args)'
 ** exceptions.TypeError: __init__() takes exactly 2 arguments (6 given)
 C:\Python24\Lib\site-packages\zope\publisher\publish.py line 119 in debug_call
 => 'return object(*args)'
 ** exceptions.TypeError: __init__() takes exactly 2 arguments (6 given)
 c:\ZopeInst\lib\python\neteven\database\items.py line 231 in addItem
 => 'dateLastUpdate = datetime.datetime.now())'
 ** exceptions.TypeError: __init__() takes exactly 2 arguments (6 given)
 
c:\python24\lib\site-packages\SQLObject-0.7.1b1-py2.4.egg\sqlobject\declarative.
 py line 93 in _wrapper
 => 'return fn(self, *args, **kwargs)'
 ** exceptions.TypeError: __init__() takes exactly 2 arguments (6 given)
 c:\python24\lib\site-packages\SQLObject-0.7.1b1-py2.4.egg\sqlobject\main.py 
line
  1195 in __init__
 => 'self._create(id, **kw)'
 ** exceptions.TypeError: __init__() takes exactly 2 arguments (6 given)
 c:\python24\lib\site-packages\SQLObject-0.7.1b1-py2.4.egg\sqlobject\main.py 
line
  1222 in _create
 => 'self._SO_finishCreate(id)'
 ** exceptions.TypeError: __init__() takes exactly 2 arguments (6 given)
 c:\python24\lib\site-packages\SQLObject-0.7.1b1-py2.4.egg\sqlobject\main.py 
line
  1246 in _SO_finishCreate
 => 'id, names, values)'
 ** exceptions.TypeError: __init__() takes exactly 2 arguments (6 given)
 
c:\python24\lib\site-packages\SQLObject-0.7.1b1-py2.4.egg\sqlobject\dbconnection
 .py line 359 in queryInsertID
 => 'return self._runWithConnection(self._queryInsertID, soInstance, id, names, 
v
 alues)'
 ** exceptions.TypeError: __init__() takes exactly 2 arguments (6 given)
 c:\ZopeInst\lib\python\sqlos\adapter.py line 86 in _runWithConnection
 => 'raise DatabaseException, tuple(exc.args)'
 ** exceptions.TypeError: __init__() takes exactly 2 arguments (6 given)
 
 Any hints, I really don't know what to do.
 
 Thanks,
 
 Stéphane




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to