#381: wxgui: Show attribute data depends on global db connection, not file db
connection parameter
-------------------------+--------------------------------------------------
Reporter: mlennert | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: unspecified
Keywords: | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
When trying to access the attribute table in the wxgui, I get an error
when the map is connected to a table which is not in the default database
of the mapset, in other words v.db.connect gives other information for
database than db.connect. This is because db.tables is called.
Probably attribute management of a single map and table management for the
default database need to be decoupled somehow...
No problem to display attribute data of 'bz' vector map in wxGUI.
'db.tables' is called on line 2460 in 'dbm' module with 'driver' and
'database' parameters. So I don't see any problem. Please correct me.
#381: wxgui: Show attribute data depends on global db connection, not file db
connection parameter
--------------------------+-------------------------------------------------
Reporter: mlennert | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: unspecified
Resolution: | Keywords:
Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by mlennert):
Replying to [comment:1 martinl]:
> Seems to work for me...
>
> {{{
> db.connect -p
> driver:sqlite
> database:$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite.db
> schema:
> group:
> }}}
>
> {{{
> v.db.connect bz -g
> 1 bz cat /home/martin/grassdata/nc_spm_08/sqlite/sqlite.db sqlite
> 2 bz1 cat /home/martin/grassdata/nc_spm_08/sqlite/sqlite.db sqlite
> 3 p cat grass_test pg
> }}}
>
> No problem to display attribute data of 'bz' vector map in wxGUI.
'db.tables' is called on line 2460 in 'dbm' module with 'driver' and
'database' parameters. So I don't see any problem. Please correct me.
IIUC, your map is connected to the database which is the default database
of the mapset ($GISDBASE/$LOCATION_NAME/$MAPSET/sqlite.db - assuming that
you are in location nc_spm_08 and mapset sqlite). The problem I saw was
when the map was connected to a database (and driver) different from the
default setting. I'll try to come up with a reproducible scenario, but
that won't be before Monday.
#381: wxgui: Show attribute data depends on global db connection, not file db
connection parameter
--------------------------+-------------------------------------------------
Reporter: mlennert | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: unspecified
Resolution: | Keywords:
Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by martinl):
> IIUC, your map is connected to the database which is the default
database of the mapset ($GISDBASE/$LOCATION_NAME/$MAPSET/sqlite.db -
assuming that you are in location nc_spm_08 and mapset sqlite). The
problem I saw was when the map was connected to a database (and driver)
different from the default setting. I'll try to come up with a
reproducible scenario, but that won't be before Monday.
in my case, the third attribute table comes from PostgreSQL database.
#381: wxgui: Show attribute data depends on global db connection, not file db
connection parameter
--------------------------+-------------------------------------------------
Reporter: mlennert | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: unspecified
Resolution: | Keywords:
Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by mlennert):
Just checked again and the issue is actually that the db.connect
parameters point to a non-existing database. That is why the db.tables
call fails.
So, not sure if this is to be considered as a bug. On the other hand, it
is an "inconvenience", if you have maps linked to different databases in
your mapset and might be confusing, when the v.db.connect parameters work.
This is why I said:
"Probably attribute management of a single map and table management for
the default database need to be decoupled somehow..."
But maybe just a more explicit error message (e.g. "Please use db.connect
to set database parameters"), might be helpful.
Leaving it open for now to keep it in mind, but if you want to close is as
"worksforme" then that's fine with me.