Hi,
 
 I'm using SQLObject 0.7.1b1 and MySQL 5. All my string columns are declared as 
UnicodeCol and I encode all my strings. I've got unicode errors each time I 
insert or update an object with non ascii characters. Here is what I get when 
updating :
 ------
 2006-07-17T23:39:25 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)
 
 And here is what I get when inserting :
 ------
 2006-07-17T23:40:58 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 on what's happening and a way to solve the problem ?
 
 Thanks, 
 
 Stéphane



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to