[mapserver-users] Fwd: Mapserver and Zope

Jean-Francois.Doyon at ccrs.nrcan.gc.ca Jean-Francois.Doyon at ccrs.nrcan.gc.ca
Wed Sep 18 15:37:52 EDT 2002


Hello,

I experienced the same problem a while ago (The draw() fucntion kept bombing
on me), but never found the solution :(

For now I have integrated mapserver into Zope using urllib, backend calls to
the mapserver cgi, and a structured template. Not as "integrated" as using
Python MapScript and far less flexible, but very fast, simple, and stable.

I however never had success even building mapscript for mapserver 3.6.1 ...
How did you guys do it? I get a bunch of errors about "ms_error" being
undeclared. even Frank had mentionned this would not be fixed until 3.7 ...
And right now for me 3.7 isn't compiling ...

I would *REALLY* like to get this working!

J.F.

-----Original Message-----
From: Sean Gillies [mailto:snchrstnglls at yahoo.com]
Sent: Wednesday, September 18, 2002 2:27 PM
To: jacobi at dfki.de; mapserver-users at lists.gis.umn.edu
Subject: Re: [mapserver-users] Fwd: Mapserver and Zope


Sven, 

I've seen and overcome each of these issues.

Any Zope method that uses mapscript should be an
external method because you'll need to access a 
map file on the filesystem.  As well, if you want
to use the module 'sys', you'll need to make 
drawmap() into an external method.  

Next, you need to build mapscript using the same
python version as comes with Zope.  If you're using
Zope 2.5, you'll need to build python mapscript
with python 2.1, and then install mapscript inside
Zope's own python.  You can do this manually or by
using a --prefix option with the setup.py script.
Once you get a mapscript installed among your other
Zope python modules, you should be ready to go.

Now, the drawing errors: I experienced some problems
like this with the 3.5 version of mapserver, and the
problems went away when I moved up to mapserver 3.6 
and 3.7.  So, honestly, I didn't overcome this
problem, but jumped over it.

Hope this helps.  cheers,
Sean

--- Steve Lime <steve.lime at dnr.state.mn.us> wrote:


> ATTACHMENT part TEXT message/rfc822 
> Date: Thu, 12 Sep 2002 13:52:35 +0200
> From: Sven Jacobi <jacobi at dfki.de>
> To: steve.lime at dnr.state.mn.us
> Subject: Mapserver and Zope
> 
> Hello,
> 
> I've seen your mails in the lists of mapserver and I
> have some
> problems to which you (I hope so) could give me some
> hints...
> 
> I'm trying to use Mapserver in Zope which is Python
> based.
> I've already "swigged" the libraries to Python and
> it seemed
> to work.
> But now I have got several problems:
> 1.When I try to test Mapserver with Python, I get a
> Segementation Fault
>    when calling the draw()-function...below the
> code:
> 
> import sys
> from mapscript import *
> 
> def drawmap(width=400, height=300, align="left"):
>  mymap = mapObj("/home/...")
>  mymap.width=width
>  mymap.height=height
>  myimage=mymap.draw()
> 
> drawmap()
> 
> Is it possible that my Python-version isn't correct,
> because it seems to
> be an
> error while changing to "C"...?
> 
> 2. In Zope I always get an error because of failed
> authorization. This
> is independent of
> the way I try it ( External Method or Python
> Script).
> 
> Have you any idea where these errors might come
> from?
> 
> I would be very glad to get an answer,
> 
> thanks in forward,
> 
> Cheers,
> 
> Sven
> 


__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com



More information about the mapserver-users mailing list