Jump to: navigation, search

ImportError: DLL load failed

2,873 bytes added, 00:38, 27 November 2010
Initial documentation for DLL load fail on Windows
==Problem Description==
On Windows GRAMPS is usually started from the menu entry or a short cut to the same location. When trying to start GRAMPS using this method GRAMPS GUI will never appear, and you will get no user information back about the problem.

The only visibility to the problem will be when you start GRAMPS from the command prompt, in that case you will get the error message from python similar to the following:

C:\Program Files\gramps>"c:\Python26\python.exe"
483: ERROR: line 138: Unhandled exception
Traceback (most recent call last):
File "", line 188, in <module>
errors = run()
File "", line 179, in run
from gui.grampsgui import startgtkloop
File "C:\Program Files\gramps\gui\", line 53, in <module>
import gtk
File "c:\Python26\lib\site-packages\gtk-2.0\gtk\", line 48, in <module>
from gtk import _gtk
ImportError: DLL load failed: The specified procedure could not be found.

What is happening is that python is trying to load the Gtk runtime, when python is unsuccessful loading the runtime, it will throw and exception and dump the above trace out.

Now it is up to the user to diagnose what is wrong with his/her system and rectify it. Unfortunately there has been multiple causes for the error in the past, this page is solely to discuss possible methods to identify and fix the above problem.

How you proceed from here is dependent on your own skill set and how dirty you are willing to get your hands.
check_gtk_install was an attempt to create a script to help diagnose problems with the gtk install, it has been of limited success, sometimes helping, sometimes confusing more. Possibly the biggest problem, is that the output of the script can be cryptic and can need someone with prior knowledge to decode it.

the check script benefits from a couple of other third party components to be downloaded as well

* [ Win32Api] Provides some ability to handle dos short path names that might be encountered in the path environment variable. This is a python library, download and install as you would any python library.
* [ Dependency Walker] Most importantly this program analyses and executable/DLL it is excellent for identifying missing DLL's. This is a zip file, download and expand the contents into the same directory that you will put the script

You will need to download,

Run the script from the command line and check (or post online in the GRAMPS Windows forum) the output of the script.

Note; The DependencyWalker section may post a number of issues, that can safely be ignored.

==dependency walker==
I want to discuss how to use dependency walker on it's own to achieve the same aim.

Navigation menu