[mapserver-users] Mapscript QueryByAttributes & Rendering problem.

Daniel Morissette dmorissette at mapgears.com
Tue Nov 18 12:03:46 PST 2008


I'm not setup to test this, but it seems to me that calling 
msResetErrorList() in the exception handling block might do the trick.

Daniel

asd asd wrote:
> I came across a problem while using python mapscript's queryByAttribute 
> function. I have a layer containing the fieldname "STATE" amongst 
> others. Issuing:
> 
> try:
>    layer.queryByAttribute(map,"STA","AZ",MS_MULTIPLE)
> except:
>    print "attribute error"
>    pass
> 
> By now the mapserver exception is caught for the faulty attribute. If a 
> draw function is now issued:
> 
> map.draw()
> 
> The following error occurs:
> 
> <class '_mapscript.MapServerError'>: msDrawMap(): Image handling error. Failed to draw layer named 'countries'. msDBFGetItemIndex(): DBASE file error. Item 'STA' not found.
> 
> I reproduced it many times and in many occasions. I tried to clear any 
> result cache but in vain. Shouldn;t mapserver handle the situation more 
> logically?
> 

-- 
Daniel Morissette
http://www.mapgears.com/



More information about the MapServer-users mailing list