Python Forum

Full Version: Problem with new PC
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
For many years I have been using a little piece of software written in Python that creates a GUI in a video game
and allows the user to create objects/characters while the game is running, for custom modding purposes.
It uses Tkinter included in the Python included with the game. The game (Blade of Darkness)dates from 1999
so quite ancient. I've used this script over various PCs starting with win98se. Big Grin
My problem is this: I recently got a new PC with win 10, which runs like lightning and the game also runs fine,
but if I try to start the add-on script it throws up a error....

Traceback (innermost last):
  File "", line 1787, in InitEB
    import EBrowser
  File "..\..\Scripts\", line 2365, in ?
    root = Tkinter.Tk()
  File "..\..\Lib\PythonLib\lib-tk\", line 886, in __init__ = _tkinter.create(screenName, baseName, className)
TclError: Can't find a usable init.tcl in the following directories: 
    {} ./lib/tcl8.0 ./lib/tcl8.0 ./library ./library ./tcl8.0/library ./tcl8.0/library

This probably means that Tcl wasn't installed properly.

It is exactly the same script and installation on my old (win 7) pc, where it works. So I can only conclude the
the win 10 os does not like it somehow.

Any possible fixes greatly appreciated. I should point out that while I am reasonably conversant with python
my knowledge is largely confined to programming this game. Cry
Quote:root = Tkinter.Tk()
It seems you're trying to run a 2.7 script in 3.x
you can modify the import to tkinter and the :
root= tkinter.Tk()
there may be other parts also... not enough info or download and run python 2.7
Thanks for the reply. If I modify the import all that happens is I get a name error.

I have been out of contact with the guy who wrote the script for many years so I can't get
a fix from him.
post the error or script not enough info...
Just to say, I cured it by copying the entire TCL folder from the PythonLib of the game and pasted it
directly on the main drive. Set -

setx /M TCL_LIBRARY "C:\Tcl\lib\tcl8.0"

via the Admin command prompt and it works as normal.