Problem with python mapscript

Franco Brusatti chinobrusatti at YAHOO.COM.AR
Fri Aug 6 13:44:32 PDT 2004


Hi list:

 I have a problem with python mapscrip. I use

 MapServer version 4.2.2 OUTPUT=PNG OUTPUT=WBMP
SUPPORTS=PROJ
SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER INPUT=EPPL7
INPUT=OGR INPUT=GDAL
INPUT=SHAPEFILE

 Python 2.3.4

 to install i use this:

 $> swig -python -modern -o mapscript_wrap.c
../mapscript.i
 $> python setup.py build
 $> su
 $> python setup.py install


 When run the test, obtain this:

  $> python tests/testMapScript.py  -v

======================================================================
ERROR: testDrawLargeJPEG
(__main__.DrawLargeJPEGTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/testMapScript.py", line 422, in
testDrawLargeJPEG
    self.mapobj1.setImageType('JPEG')
  File "build/lib.linux-i686-2.3/mapscript.py", line
1757, in setImageType
    def setImageType(*args): return
_mapscript.mapObj_setImageType(*args)
MapServerError: setImageType(): General error message.
Unable to find
IMAGETYPE 'JPEG'.

======================================================================
ERROR: testConstructorUrlStream
(__main__.ImageObjTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/testMapScript.py", line 822, in
testConstructorUrlStream
    imgobj = mapscript.imageObj(0, 0, 'GD/JPEG', url)
  File "build/lib.linux-i686-2.3/mapscript.py", line
1837, in __init__
    _swig_setattr(self, imageObj, 'this',
_mapscript.new_imageObj(*args))
MapServerError: msLoadImageGDStream(): GD library
error. Unable to
initialize image

======================================================================
FAIL: numpoints is immutable, this should raise error
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/testMapScript.py", line 690, in
testAlterNumPoints
    self.assertRaises(AttributeError, setattr,
self.line, 'numpoints', 3)
  File "/usr/lib/python2.3/unittest.py", line 295, in
failUnlessRaises
    raise self.failureException, excName
AssertionError: AttributeError

======================================================================
FAIL: testRemoveOutputFormat may error without GDAL
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/testMapScript.py", line 988, in
testRemoveOutputFormat
    assert num == 6, num
AssertionError: 5

----------------------------------------------------------------------
Ran 115 tests in 2.380s

FAILED (failures=2, errors=2)


 I try use this with Zope (ZMapServer 0.7.5), this
problem is after two o free
request crash server Zope.

Any idea?

sorry for my bad english.

=====
Chino


Prefiero morir de pie, antes que vivir una vida agachado.
Ernesto Che Guevara

Correo Yahoo! - 6 MB, tecnología antispam ¡gratis!
 Suscribite ya http://correo.yahoo.com.ar/



More information about the MapServer-users mailing list