Skip to content
Tcl Source Code Artifact [fb88ae8699]
Login

Artifact [fb88ae8699]

Artifact fb88ae8699262425b1fbd9117aa99ae238b4d8f0f6d1d51658ed3654312a89d5:

Ticket change [fb88ae8699] - New ticket [09ba902e2e37300b|09ba902e2e] <i>Intermittently unable to find init.tcl on Windows</i>. by LordAro on 2025-11-26 16:34:01.
D 2025-11-26T16:34:01.413
J assignee nobody
J closer nobody
J cmimetype text/x-markdown
J comment I've\srun\sinto\sa\scurious\sproblem\son\sWindows\swhere\sTCL\swill\sintermittently\sbe\sunable\sto\sfind\sinit.tcl,\sbut\swith\sthe\serror\s"No\serror",\swhich\sis\sespecially\sunhelpful:\r\n\r\n```\r\n>\s\s\s\s\s\s\sself.tk\s=\s_tkinter.create(screenName,\sbaseName,\sclassName,\sinteractive,\swantobjects,\suseTk,\ssync,\suse)\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\nE\s\s\s\s\s\s\s_tkinter.TclError:\sCan't\sfind\sa\susable\sinit.tcl\sin\sthe\sfollowing\sdirectories:\s\r\nE\s\s\s\s\s\s\s\s\s\s\s{C:\\builds\\m6srz7K6C\\0\\dev\\rvs\\rvs\\auxd\\python\\tcl\\tcl8.6}\r\nE\s\s\s\s\s\s\s\r\nE\s\s\s\s\s\s\sC:/builds/m6srz7K6C/0/dev/rvs/rvs/auxd/python/tcl/tcl8.6/init.tcl:\scouldn't\sread\sfile\s"C:/builds/m6srz7K6C/0/dev/rvs/rvs/auxd/python/tcl/tcl8.6/init.tcl":\sNo\serror\r\nE\s\s\s\s\s\s\scouldn't\sread\sfile\s"C:/builds/m6srz7K6C/0/dev/rvs/rvs/auxd/python/tcl/tcl8.6/init.tcl":\sNo\serror\r\nE\s\s\s\s\s\s\s\s\s\s\swhile\sexecuting\r\nE\s\s\s\s\s\s\s"source\sC:/builds/m6srz7K6C/0/dev/rvs/rvs/auxd/python/tcl/tcl8.6/init.tcl"\r\nE\s\s\s\s\s\s\s\s\s\s\s("uplevel"\sbody\sline\s1)\r\nE\s\s\s\s\s\s\s\s\s\s\sinvoked\sfrom\swithin\r\nE\s\s\s\s\s\s\s"uplevel\s#0\s[list\ssource\s$tclfile]"\r\nE\s\s\s\s\s\s\s\r\nE\s\s\s\s\s\s\s\r\nE\s\s\s\s\s\s\sThis\sprobably\smeans\sthat\sTcl\swasn't\sinstalled\sproperly.\r\n```\r\n\r\nSo\sfar\sthis\sonly\shappens\son\sour\sCI\sbuild\sjobs\son\sWindows\s(Server\s2022,\sdocker-windows\s&\sgitlab-runner),\sand\sonly\sin\smaybe\s1\sin\severy\s50\sbuilds.\sI've\shad\sno\sluck\sin\sreproducing\sthe\sissue\slocally.\sDefender\sis\sdisabled\swithin\son\sthe\sbuild\smachines\s(though\sI\sstill\swouldn't\sexpect\s'No\serror'\sfor\sthat).\r\n\r\nAs\sthe\serror\scomes\sfrom\sTCL\sitself\sand\sthere's\sno\smultithreading\sinvolved\sas\sfar\sas\sI'm\saware\s(tests\srun\svia\spytest)\sso\sI\sdon't\sthink\sit's\sanything\sdirectly\sto\sdo\swith\spython/tkinter\s-\sthere\sshouldn't\seven\sbe\sany\sother\sprocesses\srunning\stcl\sat\sthe\ssame\stime,\sall\sentirely\ssequential.\r\n\r\nThe\srelevant\sbit\sof\ssource\scode\sthat's\srunning\sis:\r\n\r\n```\r\nfrom\stkinter\simport\sTcl,\sTclError\r\ndef\srun_tcl(filename:\sstr,\stcl_code:\sstr)\s->\sstr:\r\n\s\s\s\stcl\s=\sTcl()\r\n\s\s\s\stry:\r\n\s\s\s\s\s\s\s\sreturn\stcl.eval(tcl_code)\r\n\s\s\s\sexcept\sTclError\sas\se:\r\n\s\s\s\s\s\s\s\sprint(f"Error\sin\sTcl\scode:\s{e}",\sfilename)\r\n```\r\n\r\nThis\shas\sapparently\sbeen\sseen\sin\sthe\swild\sin\sa\snumber\sof\splaces,\sbut\smostly\sin\sthe\scontext\sof\smatplotlib,\swhere\sthe\ssolution\sseems\sto\sbe\sswitching\sto\sa\sdifferent\sbackend\s(Agg)\sthat\sdoesn't\suse\stkinter.\sObviously\sthis\sisn't\sviable\sfor\sme\sas\sI'm\srunning\sTCL\scode\sdirectly.\r\n\r\n*\shttps://stackoverflow.com/questions/71443540/intermittent-pytest-failures-complaining-about-missing-tcl-files-even-though-the\r\n*\shttps://github.com/actions/setup-python/issues/1102\r\n*\shttps://github.com/microsoft/azure-pipelines-tasks/issues/16426\r\n*\shttps://github.com/orgs/community/discussions/26434\r\n*\shttps://github.com/matplotlib/matplotlib/issues/29119\r\n\r\nFor\sreference,\sI've\sseen\sit\swhen\srunning\svia\spytest\s8.4.2\son\sCPython\s3.13.9\s(with\sa\sbuild\sfrom\shttps://github.com/astral-sh/python-build-standalone),\swhich\shas\s(a\sthreaded\sbuild\sof)\sTCL\s8.6.12,\sbut\shas\sbeen\sseen\son\s3.12.10\sas\swell\s(and\sjudging\sby\sthe\sother\slinks,\splenty\sof\sother\sversions\stoo)\r\n\r\nI've\shad\sa\sgood\ssearch\sof\sthis\sbug\stracker\sand\sthe\smailing\slist\sand\shaven't\sfound\sanything\sparticularly\srelevant.\sI\srealise\sthis\sis\sa\sbit\sof\sa\sbrain\sdump\sand\sthere\sisn't\sa\shuge\samount\sto\sgo\son,\sbut\sI've\snot\sgot\sa\slot!\sI\sdon't\shave\sany\sreal\sexperience\swith\sTCL/TK,\sso\sif\sthere's\sanything\smore\sI\scan\sturn\son\sto\sdebug\sthis\sfurther\s(environment\svariables,\setc)\sit\swould\sbe\sgreatly\sappreciated!
J foundin 8.6.12
J is_private 0
J login LordAro
J priority 5\sMedium
J private_contact f5960d8c42a209f0c1345190d692f076bf24aaa0
J resolution None
J severity Important
J status Open
J submitter LordAro
J subsystem 38.\sInit\s-\sLibrary\s-\sAutoload
J title Intermittently\sunable\sto\sfind\sinit.tcl\son\sWindows
J type Bug
K 09ba902e2e37300b14634ea1d750f7e22afeeaf1
U LordAro
Z 59a5e0ce4deb30b4b6fc415f2ac244d1