classification
Title: idle_test.test_warning failure
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.5
process
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 2014-07-16 20:43 by zach.ware. 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\case.py", line 57, in testPartExecutor
    yield
  File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\unittest\case.py", line 574, in run
    testMethod()
  File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\unittest\loader.py", 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\loader.py", 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\loader.py", line 290, in _get_module_from_name
    __import__(name)
  File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\idlelib\idle_test\test_warning.py", line 19, in <module>
    from idlelib import run
  File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\idlelib\run.py", line 58, in <module>
    tcl = tkinter.Tcl()
  File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\tkinter\__init__.py", line 1901, in Tcl
    return Tk(screenName, baseName, className, useTk)
  File "E:\Data\buildslave\cpython\3.x.snakebite-win2k3r2sp2-x86\build\lib\tkinter\__init__.py", line 1805, in __init__
    self.tk = _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. http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%203.x/builds/2274/steps/test/logs/stdio
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.
http://hg.python.org/cpython/rev/c507da0b573f
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.
History
Date User Action Args
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