[mapserver-users] Fwd: Mapserver and Zope
Sean Gillies
snchrstnglls at yahoo.com
Wed Sep 18 11:26:43 PDT 2002
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