This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steevel
Recipients
Date 2006-09-21.11:59:41
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
I got across this while trying to use MySQLdb in a
thread. Since MySQLdb imports decimal I got the same
error there.

Code: (This happens in both 2.4 and 2.5)

import thread, time, sys
if len(sys.argv) > 1:
   import threading

def test ():
   import decimal
   print 'Exiting test.'

thread.start_new_thread(test, ())
time.sleep(1)


Output:
$ ./thread.py 1
Exiting test.

$ ./thread.py
Exiting test.
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/local/python2.5/lib/python2.5/atexit.py",
line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File
"/usr/local/python2.5/lib/python2.5/threading.py", line
656, in __exitfunc
    self._Thread__delete()
  File
"/usr/local/python2.5/lib/python2.5/threading.py", line
540, in __delete
    del _active[_get_ident()]
KeyError: -1209698640
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/local/python2.5/lib/python2.5/atexit.py",
line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File
"/usr/local/python2.5/lib/python2.5/threading.py", line
656, in __exitfunc
    self._Thread__delete()
  File
"/usr/local/python2.5/lib/python2.5/threading.py", line
540, in __delete
    del _active[_get_ident()]
KeyError: -1209698640
History
Date User Action Args
2008-01-20 09:59:00adminlinkissue1562822 messages
2008-01-20 09:59:00admincreate