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.

Title: idle_test.test_warning failure
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.5
Status: closed Resolution: duplicate
Dependencies: Superseder: Clean up Tcl library discovery in Tkinter on Windows
View: 20035
Assigned To: zach.ware Nosy List: neologix, python-dev, terry.reedy, vstinner, zach.ware
Priority: normal Keywords:

Created on 2014-03-25 08:12 by neologix, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg214781 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2014-03-25 08:12
Many buildbots are failing with this error:
ERROR: idlelib.idle_test.test_warning (unittest.loader.ModuleImportFailure)
Traceback (most recent call last):
  File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\unittest\", line 57, in testPartExecutor
  File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\unittest\", line 574, in run
  File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\unittest\", line 32, in testFailure
    raise exception
ImportError: Failed to import test module: idlelib.idle_test.test_warning
Traceback (most recent call last):
  File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\unittest\", line 312, in _find_tests
    module = self._get_module_from_name(name)
  File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\unittest\", line 290, in _get_module_from_name
  File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\idlelib\idle_test\", line 19, in <module>
    from idlelib import run
  File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\idlelib\", line 58, in <module>
    tcl = tkinter.Tcl()
  File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\tkinter\", line 1901, in Tcl
    return Tk(screenName, baseName, className, useTk)
  File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\tkinter\", line 1805, in __init__ = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories: 
    E:/Data/buildslave/cpython/3.x.snakebite-win2k3r2sp2-x86/build/lib/tcl8.6 E:/Data/buildslave/cpython/3.x.snakebite-win2k3r2sp2-x86/build/lib/tcl8.6 E:/Data/buildslave/cpython/3.x.snakebite-win2k3r2sp2-x86/lib/tcl8.6 E:/Data/buildslave/cpython/3.x.snakebite-win2k3r2sp2-x86/build/library E:/Data/buildslave/cpython/3.x.snakebite-win2k3r2sp2-x86/library E:/Data/buildslave/cpython/3.x.snakebite-win2k3r2sp2-x86/tcl8.6.1/library E:/Data/buildslave/cpython/tcl8.6.1/library

This probably means that Tcl wasn't installed properly.

See e.g.
msg214784 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-03-25 08:20
It's probably a regression of the changeset c2e2dc6c8769b6f37638149a9e9d0aad5845b3f1:
"Issue #15968: Incorporated Tcl, Tk, and Tix builds into the Windows build solution. "
msg214823 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-03-25 13:06
Indeed, although honestly I can't figure out exactly why.  However, #20035 should fix the failures; I haven't committed it because the patch is in C and I can't guarantee that I haven't missed anything big.  If either of you (or anyone else at all :-) could review that patch for me, I would be very grateful.
msg215727 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-04-08 04:33
New changeset c507da0b573f by Zachary Ware in branch 'default':
Issue #21059: Temporary measure to make the Windows buildbots useful again.
msg223272 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-07-16 20:43
I believe I eventually figured out the reason for the failure, it had to do with the fact that the Tcl/Tk DLLs were copied into PCbuild to avoid adding ..\tcltk[64]\bin to PATH and the persistent issue that tkinter._fix changes environment variables to make init.tcl findable, while regrtest unsets those variables at the end of each test.  The issue is successfully worked around in test[-amd64].bat, and should be fixed by #20035 (once reviewed :)).

Closing this issue.
Date User Action Args
2022-04-11 14:58:00adminsetgithub: 65258
2014-07-16 20:43:09zach.waresetstatus: open -> closed
superseder: Clean up Tcl library discovery in Tkinter on Windows
messages: + msg223272

dependencies: - Clean up Tcl library discovery in Tkinter on Windows
resolution: duplicate
stage: resolved
2014-04-08 04:33:42python-devsetnosy: + python-dev
messages: + msg215727
2014-03-29 07:33:44terry.reedysetnosy: + terry.reedy
2014-03-25 13:06:51zach.waresetassignee: zach.ware
dependencies: + Clean up Tcl library discovery in Tkinter on Windows
versions: + Python 3.5
2014-03-25 13:06:19zach.waresetnosy: + zach.ware
messages: + msg214823
2014-03-25 08:20:49vstinnersetnosy: + vstinner
messages: + msg214784
2014-03-25 08:12:54neologixcreate