[GRASS-dev] gis.m in wingrass: using where clause in d.vect causes error :can't read "_data(.gronsole.gronsole, 9, donecmd)": no such element in array

Hamish hamish_nospam at yahoo.com
Sat Oct 7 22:59:45 EDT 2006


Moritz Lennert wrote:
> Using a where clause in vector display in gis.m causes the following 
> error under WinGRASS. Any suggestions ?
> (WinGRASS version 2006-09-17)
> 
> can't read "_data(.gronsole.gronsole,9,donecmd)": no such element in
> array can't read "_data(.gronsole.gronsole,9,donecmd)": no such
> element in array
>      while executing
> "set donecmd $_data($path,$ci,donecmd)"


also seen on Linux, GRASS versions 6.3 and 6.2-rc1  IF you put the
query in the "query cat values" box by mistake. I just made the same
mistake trying to recreate your error.

(spearfish dataset, "fields" vector map, query: "cat > 30")


Put the query in the "use SQL query" box not the "query cat values" and
it performs the query & display correctly.

If you put "30" in the "query cat values" box it just draws area 30.

If you put "30,54" in the "query cat values" box it just draws areas 30
and 54.

If you put "30-54" in the "query cat values" box it just draws areas 30
through 54.

If you put "30-54" in the "query cat values" box it just draws areas 30
through 54.

If you put "30-54,63" in the "query cat values" box it just draws areas
30 through 54 and area 63.


I think the ">" is getting treated as a redirect. With other non int
range stuff in that line G_parser() gives an understandable error.


better wording and/or input sanity checks needed in gis.m..
 (or note-to-self for future WxPython rewrites).


Hamish




More information about the grass-dev mailing list