Changes

Jump to: navigation, search

ImportError: DLL load failed

1,560 bytes added, 04:27, 27 November 2010
Add info on a minal test displaying ImportError: DLL load failed
==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 using this method will cause the GRAMPS GUI will 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:
C:\Program Files\gramps>"c:\Python26\python.exe" gramps.py
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. 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 has have been multiple causes for the error in the pastthis 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.
In the above example, python tried to start GRAMPS this is a complicated test case, so I'd like to try and simplify it to a minimal test case that exhibits the same behaviour. This minimal test case can then be used when testing if changes to the environment have had any effect on the problem. The minimal test case does not even use GRAMPS.
 
===Minimal Test Case===
 
Simply start a windows command prompt.
{{man tip|Tip: |How to start Python 2.6 command line on Windows XP using the Start Menu <br> '''''Start -> All Programs-> Python 2.6 -> Python (Command Line)'''''}}
 
Once the command prompt has started type '''''import gtk''''' in the command prompt window.
 
Python 2.6.3 (r263rc1:75186, Oct 2 2009, 20:40:30) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import gtk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\Python26\lib\site-packages\gtk-2.0\gtk\__init__.py", line 48, in <module>
from gtk import _gtk
ImportError: DLL load failed: The specified procedure could not be found.
>>>
 
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.
28
edits

Navigation menu