Start a new topic

Creator 15 Openflight Script Tkinter Import Error

I have trouble with running Python 2.7 OpenFlight Script with Tkinter in Creator 15. However the script is running fine in Creator 4.2 (with Python 2.5).

The error message is following:

E: Traceback (most recent call last):

E: File "", line 30

E: File "C:\Python27\Lib\lib-tk\", line 38, in <module>

E: import FixTk

E: File "C:\Python27\Lib\lib-tk\", line 65, in <module>

E: import _tkinter

E: ImportError: DLL load failed: The specified module could not be found.

The script is a GUI application. All of the Python directories needed are in sys.path.

Could you help me resolve this issue?

We've seen Python modules fail to load similar to this. Usually this happens when a DLL required by the Python module cannot be loaded. The dependent DLL may fail to load if either:

  • The DLL is not found in the program's PATH.
  • The DLL is compiled in a way that is incompatible with Creator.
Can you verify that the PATH is set up such that the DLLs upon which Tkinter depend will be "found" at runtime?

The PATH is set up, every dependency is in that. We did not have any problem with Creator 4.2 but the version 15 cannot load even base modules such as math.

Is it not possible to use external Python libraries in Creator any more?

You should be able to load base Python modules in Creator without problem. I am able to load math in CR 15 so I suspect something may be wrong in your set up. What is the error message you get when you try to import math in Creator OpenFlight Script Editor? I suspect PYTHONPATH may not be set up correctly for Creator to find your installation.

Thank you. I can load math module now. However, Tkinter does not load still. If I run only the import statement: "import Tkinter" then I get the error message mentioned above. Can you import Tkinter?  

No I cannot import Tkinter in Creator 15 either. Although I get a slightly different error message:
Untitled script saved to <C:/Presagis/Suite15/Creator/config/scripteditor/>

Run Script started <Untitled>... 

E: Traceback (most recent call last):

E: File "Untitled", line 1

E: File "C:\Python27\Lib\lib-tk\", line 39, in <module>

E: import FixTk

E: File "C:\Python27\Lib\lib-tk\", line 69, in <module>

E: import _tkinter

E: ImportError: DLL load failed: %1 is not a valid Win32 application.

As I suggested above, I believe my error is happening because one or more DLLs upon which Tkinter depend cannot load in Creator. This could be caused by one of several reasons:

1) a c-runtime DLL is missing that the Tkinter DLL depends on

2) the Tkinter DLL is built with a different version of Visual Studio than Creator and that is making the Tkinter DLL incompatible in some way

Can you import Tkinter in your python script outside of Creator? Say, in a different Python IDE?

Yes, I can import it with the base Python 2.7 interpreter. I have experienced this error only in Creator 15.

Do you think that there is a solution for this issue?

I believe the problem is an incompatibility between Creator and your installed version of Python. I do not believe there is a solution for Creator 15. Sorry about that.
Login to post a comment