[Mapserver-users] mapscript shapefileObj

Norman Vine nhv at cape.com
Thu Apr 10 07:10:01 EDT 2003


Michael Schulz writes:
> 
> i have run into a error with my applications using python/mapscript.
> With one of the latest nightlies the new shapefileObj() function
> complains it needs 3 arguments instead of 2 !?
> 
> >>> from mapscript import *
> >>> r = shapefileObj("c:\\tonne\test.shp",MS_SHAPE_POINT)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "C:\programme\zope_jupiter\bin\DLLs\mapscript.py", line 359, in
> __init__
>     self.this = apply(_mapscript.new_shapefileObj,args)
> TypeError: new_shapefileObj() takes exactly 3 arguments (2 given)
> 
> Can anybody reproduce this error? TIA, Michael

Yes :-(

FYI here is the mod I made to my local mapscript to revert to
previous behaviour.

Note the shapepath variable does not appear to be used anywhere

HTH

Norman


Index: mapscript.i
===================================================================
RCS file: /data2/cvsroot/mapserver/mapscript/mapscript.i,v
retrieving revision 1.107
diff -c -w -r1.107 mapscript.i
*** mapscript.i 28 Mar 2003 20:21:20 -0000      1.107
--- mapscript.i 10 Apr 2003 10:44:03 -0000
***************
*** 990,996 ****
  // class extensions for shapefileObj
  //
  %extend shapefileObj {
!   shapefileObj(char *filename, char *shapepath, int type) {
      shapefileObj *shapefile;
      int status;

--- 990,996 ----
  // class extensions for shapefileObj
  //
  %extend shapefileObj {
!   shapefileObj(char *filename, int type) {
      shapefileObj *shapefile;
      int status;



More information about the mapserver-users mailing list