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 serhiy.storchaka
Recipients BreamoreBoy, Honest Abe, Keith.Bannister, PythonInTheGrass, amaury.forgeotdarc, asvetlov, belopolsky, cgohlke, loewis, pitrou, serhiy.storchaka, terry.reedy
Date 2014-07-12.07:49:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I can't reproduce the bug on 2.7.8+, but on 2.7.3 I sometimes got messages like "Exception in thread Thread-26 (most likely raised during interpreter shutdown):" or:

  File "/usr/lib/python2.7/lib-tk/", line 2204, in create_line
  File "/usr/lib/python2.7/lib-tk/", line 2184, in _create
<type 'exceptions.TypeError'>: 'NoneType' object is not callable

This points to shutdown issue. When call quit(), other threads are still work. And when modules (including Tkinter and __main__) are cleaned, they try to call global functions which are set to None. After fixing to not invoke any code during shutdown, error messages on 2.7.3 gone.

I don't see any bugs in Tkinter exposed by this script, only a bug in the script itself.

Here is a script with quick and dirty fix. This solution is not perfect, there is small chance of race conditions (happened once in about 500 runs). Correct solution should be more complicated. If there no other errors in, this issue can be closed.
Date User Action Args
2014-07-12 07:49:23serhiy.storchakasetrecipients: + serhiy.storchaka, loewis, terry.reedy, amaury.forgeotdarc, belopolsky, pitrou, asvetlov, cgohlke, BreamoreBoy, PythonInTheGrass, Honest Abe, Keith.Bannister
2014-07-12 07:49:23serhiy.storchakasetmessageid: <>
2014-07-12 07:49:23serhiy.storchakalinkissue11077 messages
2014-07-12 07:49:23serhiy.storchakacreate