missing __init__ in python mapscript

trussell at mtcsc.com trussell at mtcsc.com
Thu Jan 24 19:48:44 EST 2002


In the book, Python Essential Reference, there's a part at the end of the chapter on extending and embedding python where Beazley describes the process of compiling extensions. In this, he creates a file, Setup, which is used by make in the build process. In adapting this to building mapscript, my file looks like the following:

*shared*
mapscript mapscript_wrap.c

I then run the command:
make -f Makefile.pre.in boot

This is a very simple procedure and results in mapscriptcmodule.sl (HPUX). Unfortunately, when attempting to import mapscript from the python command line, I get the following error:

Python 1.5.2 (#10, Nov  5 2001, 12:00:19) [C] on hp-uxB
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import mapscript
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "mapscript.py", line 2, in ?
    import mapscriptc
ImportError: dynamic module does not define init function (initmapscriptc)
>>> 

It appears that this function actually is defined but is not being found for some reason. Has anyone used this method to build python mapscript? Must it be done manually instead?

Regards,
Tom Russell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20020124/aef8a44b/attachment.html


More information about the mapserver-users mailing list