Seite 1 von 1

python mapscript

Verfasst: Freitag 7. Dezember 2007, 11:51
von orc
Hallo,

ich habe folgendes Problem mit meiner Pythoninstallation. Wenn ich folgendes Skript aufrufe:

Code: Alles auswählen

#!/usr/local/bin/python
import mapscript

# Set the map file to use
mapfile = "geoland_test.map"

# Create a mapObj, initialized with the mapfile above
mapobject = mapscript.mapObj(mapfile)

# Create an imgObj that has an image of the map
mapimage = mapobject.draw(  )

# Save the mapimage to a file
mapimage.save("geoland.png")

erhalte ich folgenden error_log fehler:
[Fri Dec 07 10:49:12 2007] [error] [client 172.21.18.22] Traceback (most recent call last):
[Fri Dec 07 10:49:12 2007] [error] [client 172.21.18.22] File "/var/www/htdocs/tc/tests/test.py", line 2, in <module>
[Fri Dec 07 10:49:12 2007] [error] [client 172.21.18.22] import mapscript
[Fri Dec 07 10:49:12 2007] [error] [client 172.21.18.22] ImportError: No module named mapscript
[Fri Dec 07 10:49:12 2007] [error] [client 172.21.18.22] Premature end of script headers: test.py
hat vielleicht jemand eine Idee wie ich den mapserver für python aktiviere bzw installieren kann?
mapserver version 4.10.2 ist auf meinem system installiert.[/quote]

Verfasst: Freitag 7. Dezember 2007, 14:46
von Leonidas
Was ist denn `mapscript`? Wo kommt das her?