Jump to: navigation, search

ImportError: DLL load failed

2,761 bytes added, 06:22, 27 November 2010
Update info on
==Problem Description==
On Windows GRAMPS is usually started from the menu entry or a short cut to the same location, that is fine when everything is working fine. When your system is experiencing the problem described here, trying to start GRAMPS will cause the GRAMPS GUI to never appear, and you will get no user information back about the problem.
The only visibility to the actual 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:
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 an exception and dump the above trace out. There can be many reasons why python cannot load the gtk-runtime.
Now it is up to the user to diagnose what is wrong with his/her system and rectify it. Unfortunately since there have been multiple causes for the error in the past this can be quite difficult resulting in potential GRAMPS users to throw their hands up in disgust and give up, this page is solely to discuss possible methods to identify and fix the above problem.
If your minimal test throws the exception as shown you have just proved the problem exists between python and gtk-runtime, this is not a GRAMPS problem.
How you proceed from here is dependent on your own skill set and how dirty you are willing to get your hands.
{{man warn|Warning: |Whenever you try to fix your systems environment to rectify the problem, your will need to close the python command line and start a new one, so it can pick up the new environment from the system}}
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.
You will need to download [] the check script benefits from a couple of other third party components to be downloaded as well. The script does not need the 3rd party components, but the scripts usefulness will be limited without them.
* [ 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.
Run the script from the windows command line prompt and check (the output of the script. Should you become stuck, cannot make head or post online in tail of the output, then consider posting a description of your problem and the output of check_gtk_install on the [ GRAMPS Windows forum) ].{{man warn|Warning: |Windows command prompt is not the python command line described in the last section <br>Once again when you try to fix your systems environment to rectify the problem, your will need to close the command prompt window and start a new one, so it can also pick up the new environment from the system}} When viewing the results of the output, you should pay particular attention to any line that starts with ''''' ERROR:''''' these lines will give specific clues to what the problem may be. The section of output dedicated to DependencyWalker section may post a number of issues, that may safely be ignored depending on your operating system. for example: ==== Checking with Dependency Walker ==== Please be patient takes some time Testing file c:\python27\Lib/site-packages/gtk-2.0/gtk/_gtk.pyd EFSADU.DLL Error dll not found IESHIMS.DLL Error dll not found WER.DLL Error dll not found ERROR: c:\windows\system\INTL.DLL Version ERROR: c:\windows\system\ICONV.DLL Version MS runtime Version 9.0.21022.8 loaded from c:\windows\system32\MSVCR90.DLL MS runtime Version 9.0.30729.4148 loaded from c:\windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4148_x-ww_d495ac4e\MSVCR90.DLL This snippit of output shows 3 DLL's whose line ends with '''Error dll not found''', after getting such a result, a little research online showed they are only are relevant for other versions of Windows and can safely be dismissed as a cause of the problem. The two lines starting with ''' ERROR:''' are of more interest. These two DLL's should have been loaded from the gtk-runtime directory, however for whatever reason they have been found and loaded from c:\windows\system . In this case renaming those two DLL's in the windows directory python to correctly import gtk, hence GRAMPS was then able to work. What had happened in the above case, although the two DLL's were found in windows\system, gtk-runtime could not work with them as they were from an older installation, and not the correct version for the current gtk installation. Output from should be used as a guide to possible issues, it is possible for the scriptto give the thumbs up, but a problem still exists on the system.
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