python_d won't load modules...

Mark Hammond MarkH at ActiveState.com
Tue Nov 14 01:31:19 CET 2000


jaimewyant at my-deja.com wrote:

> I have compiled Python 2.0 under MSW/MSVC 6

> 
> I have also written a python extension module in C that I would like to
> debug.  I use swig to wrap the module, but I can't get the module to
> load with the python_d executable (cygwin, not linux):

I suspect you have not named your debug version _d.

> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> ImportError: No module named afplibc
> [4940 refs]

Python can not find adplibc_d.pyd/.dll

> Now, if I run the release version of python:
> 
> (698) ~/code/pyext_afplib/Debug$ python
> Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)] on win32
> Type "copyright", "credits" or "license" for more information.
> 
>>>> import afplibc
>>> 
> Fatal Python error: Interpreter not initialized (version mismatch?)
> (699) ~/code/pyext_afplib/Debug$

Almost certainly, this release version of Python is picking up your 
debug DLL.  Your debug DLL then pulls in Python_d.dll, and with 2 
Python's, things get upset.

Just rename your debug extension!

Mark.




More information about the Python-list mailing list