RuntimeWarning: tp_compare

Bruno Barberi Gnecco brunobgDELETETHIS at
Tue Oct 9 22:55:49 CEST 2007

	I'm getting the following exception when I call an external extension

/usr/lib/python2.5/ RuntimeWarning: tp_compare didn't return -1 or -2 for 
   return _active[_get_ident()]
Traceback (most recent call last):
   File "", line 77, in <module>
   File "", line 41, in testPlace
     data = db.getDescription(event['id'])
   File "", line 28, in getDescription
     return self.getRow(query, (id,))
   File "../", line 73, in getRow
   File "/usr/lib/python2.5/", line 94, in acquire
     me = currentThread()
   File "/usr/lib/python2.5/", line 697, in currentThread
     return _active[_get_ident()]
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfa' in position 52: ordinal 
not in range(128)
 > /usr/lib/python2.5/
-> return _DummyThread()

	Note that the error occurs *after* the call that I isolated as
affecting it (pytst.scan(), in the case). This doesn't happen for simple,
isolated cases, but googling for "tp_compare threading" shows a lot of
similar issues. Does anybody here know what this could be about? Any ideas
to debug or work around it?

Bruno Barberi Gnecco <>
I can read your mind, and you should be ashamed of yourself.

More information about the Python-list mailing list