[GRASS-user] query tool in wxGUI doesn't work on multiple table
connections
Shane Litherland
litherland-farm at bigpond.com
Fri Dec 23 19:54:57 EST 2011
Hi again, this is something I'd posted about for ~RC1 I think; that the
query tool 'fails' when selecting a (vector) item that has connections
to tables on more than one level.
I've done a bit more strategic testing with ~RC2.
In my example, if I select a centroid/area that has some data on layer 1
the little display/edit dialog pops up.
If I select another area on same vector that I know has data on layer
one, plus data on layer two, I get an error message in the command
console, the key problem seems to be:
if self.tables[table][key]['ctype'] != types.StringType:
KeyError
:
'chem_conc'
........
'chem_conc' is a column in chemical_use that is 'integer'. I get a
similar message from another vector for a table on layer three with a
column called 'grthrs_pax' which is 'character varying(20)'.
The only thing I can see in common here is that each of these columns is
the last column in their respective table, and the tables are connected
to the vector on the last layer connection.
I have done a quick test with a 'dummy' vector connecting to each of
these 'problem' tables separately, i.e. only one table connection for
the vector, on layer one. the query tool then works. So it doesn't seem
to have a problem with the data or layout of those tables on their own.
I then tried the same table connected on layer 1 and 2, with a different
cat for each layer, and the query tool reported both correctly.
When I put both of the 'problem' tables together (chemical_use layer 1,
grthrs layer 2), I got the earlier error scenarios, just slightly
different error detail.
if self.tables[table][key]['ctype'] != types.StringType:
KeyError
:
'grthrs_pax'
connecting the chemical_use table to both layers 1 and 2 and the query
tool worked OK.
connecting chemical_use to layer 2 then grthrs to layer 1 (reverse of
earlier test) did similar oddities. There was one error which I couldn't
repeat with consistency, but after changing table connection settings,
then using the query tool, the immediate query result:
if self.tables[table][key]['ctype'] != types.StringType:
KeyError
:
'public.grt_hours'
which indicated it wasn't happy accessing one of the tables at all?
after viewing vector in digitizing mode and back to normal mode, error
was:
if self.tables[table][key]['ctype'] != types.StringType:
KeyError
:
'chem_conc'
which was consistent with the original scenario.
So I don't know why occasionally, there was a different error in between
changing which tables were connected to which layers, that disappeared
only after accessing the vector in digising mode.
But the main problem of the query tool not working with multiple layer
connections doesn't seem to be just the issue of multiple layers, as it
worked when the same table was on two layers. It seems to be when each
of the layers has different tables, and for some reason the query tool
then can't handle different table layouts???
Is this demo clear enough on the problem? where to from here?
-shane
More information about the grass-user
mailing list