[GRASS-dev] Re: [GRASS-user] wxPython interface, gwx workspace format

Glynn Clements glynn at gclements.plus.com
Mon May 5 16:24:17 EDT 2008


Benoit ANDRE wrote:

> I experienced some problem (bogus ?) with the "save workspace" in gxw
> format.
> 
> When there is a clause "where" in the vector layer, a "=" sign in the
> sql query (i.e. d.vect map=essais_psql_grass at 07485 where=termine=1
> display=shape,attr type=point,line,boundary,area color=255:255:0
> fcolor=255:255:0 lcolor=255:255:0 icon=basic/circle size=5 width=1
> layer=1 llayer=1 attrcol=nom xref=center yref=center lsize=8) causes
> this message when saving workspace : 
> 
> Writing current settings to workspace file failed (too many values to
> unpack).
> 
> This not appear if a "<" or ">" sign (... where=termine>1 ...).

[CC to grass-dev.]

It appears that something is using e.g.:

	(var,val) = string.split('=')

when it should be using:

	(var,val) = string.split('=', 1)

so that only one split occurs.

As for exactly what is doing this: someone familiar with the code
which saves the workspace can probably find it quicker than I can.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list