[mapserver-users] python mapscript error

Luca Delucchi lucadeluge at gmail.com
Wed Sep 21 11:52:06 EDT 2011


Hi everybody, I'm starting to use python mapscript to create web
services, but I have a problem when I try to create a new layer.
I saw this [0] thread, and I try to apply the patch but it didn't
work. I'm running svn version of branches 6 on a Ubuntu OS

lucadelu at giswks001:~/compilati/mapserver6-0/mapserver/mapscript/python$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mapscript
>>>
>>> map = mapscript.mapObj( )
>>> map.name = "Orthophoto Merano"
>>> map.setSize(250, 250)
1
>>> map.setExtent(11.134999, 46.617079, 11.212800, 46.692624)
0
>>> map.imagecolor.setRGB(255, 255, 255)
0
>>> map.units = mapscript.MS_DD
>>> layer = mapscript.layerObj()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "mapscript.py", line 807, in __init__
    if args and len(args)!=0:
NameError: global name 'args' is not defined
>>> layer = mapscript.layerObj(map)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "mapscript.py", line 807, in __init__
    if args and len(args)!=0:
NameError: global name 'args' is not defined


[0] http://gis.stackexchange.com/questions/8735/using-mapscript-to-create-a-mapfile-from-scratch

-- 
thanks
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org


More information about the mapserver-users mailing list