Doh! (Re: [Mapserver-users] python mapscript)

Sean Gillies sgillies at frii.com
Thu Dec 12 08:07:55 PST 2002


Sean Gillies wrote:
> Sven Jacobi wrote:
> 
>> Hello,
>>
>> I'm using Mapserve3r inside Zope and want to create
>> several layers. As long as I use the normal shapefiles
>> as DATA in my mapfile this works fine. But when I want to have a map 
>> given from a "picture" (tif)
>> I get "Bus errors" from python.
>> Below is a small piece of code, have I forget to call some
>> functions?
>>
>> def drawmap():
>>  mymap = mapObj("/home/jacobi/...")
>>  mymap.width=600
>>  mymap.height=400
>>  myimage=mymap.draw()
>>  out = myimage.saveImage("blies.png",MS_PNG,50,0,50)
>>  return out
>>
>> drawmap()
>>
>> Any ideas or hints?
>> Thanks in forward,
>>
>> Cheers,
>> Sven
>>
>>
>> _______________________________________________
>> Mapserver-users mailing list
>> Mapserver-users at lists.gis.umn.edu
>> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>>
>>
> 
> Sven,
> 
> Python is not raising a bus error, so the error is most
> likely due to problems with your mapscript C lib.  Have
> you tried using a TIFF as a raster layer before?  Are
> you using GDAL to access the TIFF?  There are many
> possible problems, you should provide a bit more data
> to help with the diagnosis:
> 
> Operating system, software (version/revision), compiler,
> Python distribution, etc.
> 
> cheers,
> Sean
> 

Sven,

I wish I'd waited to send that previous email.

The first 'gotcha' I encountered when I started using
Python Mapscript and Zope was due to a Python version
difference.  Zope 2.4-6 use Python 2.1.  If you've
been using Python 2.2 (as I had been), you will need
to rebuild mapscript using Python 2.1.

You should be able to use the Python that comes with
Zope, for example:

/var/zope/bin/python setup.py install

Or something like that.  Hope this helps.

-- 
# Sean Gillies
# sgillies at frii.com




More information about the MapServer-users mailing list