[mapserver-users] Problem with Python MapScript queryByRect

Just van den Broecke justb4 at gmail.com
Fri Jun 26 08:55:01 PDT 2020


Hi,

I am reviving a Python 2 MapServer MapScript app that used to work 7 
years ago (and still is in old deployment) but stuck in some MapScript 
calls that fail but also throw no Exceptions.

Purpose of the app "MapGlow" [1] is to generate a WMS-heatmap triggered 
by specific STYLE parameters. When no heatmap STYLE is requested 
requests are delegated to map_file.OWSDispatch() etc. The latter works 
fine so the overall setup/stack/mapfile is working. Using MS 7.6.0 in 
Docker (compose) with Lighttp, FastCGI, WSGI, flup.

It is only when  layerObj.queryByRect() is called, a HTTP 500 is 
returned after a FastCGI hard error, no means to catch an Exception. The 
passed MapFile and Rect objects seem ok. Also I noticed that 
layerObj.metadata had 0 items. I can see that I have proper SWIG objects 
like
<mapscript.layerObj; proxy of <Swig Object of type 'layerObj *' at 
0x7fded06b1de0> >
If only I could get a hint, a MapFile setting, maybe some log output or 
debug flag I can set? The WIP is on GH, I can point at the failing line 
[2] but the code is
quite involved (mind, my first Python 7-9 years ago):

[1] https://github.com/justb4/mapglow
[2] 
https://github.com/justb4/mapglow/blob/master/app1/wms/mapglow_ms.py#L249

Thanks for any help,

Just van den Broecke
The Netherlands


More information about the mapserver-users mailing list