From: Oleg B. <ph...@ph...> - 2012-02-28 09:11:29
|
On Mon, Feb 27, 2012 at 08:20:57PM -0500, Markos Kapes wrote: > I"m getting a UnicodeDecodeError and I"m unsure how to fix it... > /Library/Python/2.7/site-packages/sqlobject/dbconnection.pyc in _insertSQL(self, table, names, values) > 460 return ("INSERT INTO %s (%s) VALUES (%s)" % > 461 (table, ', '.join(names), > --> 462 ', '.join([self.sqlrepr(v) for v in values]))) > 463 > 464 def transaction(self): > > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 14: ordinal not in range(128) > I'm using sqlobject 1.2.1, mysqldb 1.2.3 and the tables in the database are formatted for unicode. The objects' columns in sql are UnicodeCol. The connection string for the database is > u'mysql://dbuser:@localhost/databasename?debug=1&logger=MyLogger&loglevel=debug&use_unicode=1&charset=utf8' > Not sure what else to try.... Can you test if there are unicode names in the ``names`` list? Oleg. -- Oleg Broytman http://phdru.name/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |