[GRASS-user] Reconnecting vector attribution with Postgres/PostGIS
Paul Shapley
p.shapley at gmail.com
Mon Feb 2 04:37:33 PST 2015
Hi Grass 7 users.
I am trying to connect some vector layers with thier respective attribute
tables in postgres/postgis. The tables all connected under version 6.4.4
but not since upgrading to version 7RC1 (on winxp in this instance) they do
not. It looks like Grass cannot find the database password but it is
present in 'db.login'. Has anyone else had this happen? Here are the
outputs:-
*Grass Command Prompt*
Cleaning up temporary files...
Starting GRASS GIS...
ERROR: Location <demolocation> not found
WARNING: Concurrent mapset locking is not supported on Windows
__________ ___ __________ _______________
/ ____/ __ \/ | / ___/ ___/ / ____/ _/ ___/
/ / __/ /_/ / /| | \__ \\_ \ / / __ / / \__ \
/ /_/ / _, _/ ___ |___/ /__/ / / /_/ // / ___/ /
\____/_/ |_/_/ |_/____/____/ \____/___//____/
Welcome to GRASS 7.0.0RC1
GRASS homepage: http://grass.osgeo.org
This version running through: Command Shell
(C:\WINDOWS\system32\cmd.
exe)
Help is available with the command: g.manual -i
See the licence terms with: g.version -c
If required, restart the GUI with: g.gui wxpython
When ready to quit enter: exit
Launching <wxpython> GUI in the background, please wait...
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
H:\>DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
GRASS_INFO_WARNING(2500,1): Unable to open database
<host=gisdb.neath-porttalbot
.gov.uk, dbname=postgis> by driver <pg>
GRASS_INFO_END(2500,1)
GRASS_INFO_WARNING(2500,2): Unable open database
<host=gisdb.neath-porttalbot.go
v.uk, dbname=postgis> by driver <pg>
GRASS_INFO_END(2500,2)
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
GRASS_INFO_ERROR(2500,3): Unable to open database
<host=gisdb.neath-porttalbot.g
ov.uk, dbname=postgis>
GRASS_INFO_END(2500,3)
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
GRASS_INFO_WARNING(4928,1): Unable to open database
<host=gisdb.neath-porttalbot
.gov.uk, dbname=postgis> by driver <pg>
GRASS_INFO_END(4928,1)
GRASS_INFO_WARNING(4928,2): Unable open database
<host=gisdb.neath-porttalbot.go
v.uk, dbname=postgis> by driver <pg>
GRASS_INFO_END(4928,2)
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
GRASS_INFO_ERROR(4928,3): Unable to open database
<host=gisdb.neath-porttalbot.g
ov.uk, dbname=postgis>
GRASS_INFO_END(4928,3)
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
GRASS_INFO_WARNING(3988,1): Unable to open database
<host=gisdb.neath-porttalbot
.gov.uk, dbname=postgis> by driver <pg>
GRASS_INFO_END(3988,1)
GRASS_INFO_WARNING(3988,2): Unable open database
<host=gisdb.neath-porttalbot.go
v.uk, dbname=postgis> by driver <pg>
GRASS_INFO_END(3988,2)
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
GRASS_INFO_ERROR(3988,3): Unable to open database
<host=gisdb.neath-porttalbot.g
ov.uk, dbname=postgis>
GRASS_INFO_END(3988,3)
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
GRASS_INFO_WARNING(4156,1): Unable to open database
<host=gisdb.neath-porttalbot
.gov.uk, dbname=postgis> by driver <pg>
GRASS_INFO_END(4156,1)
GRASS_INFO_WARNING(4156,2): Unable open database
<host=gisdb.neath-porttalbot.go
v.uk, dbname=postgis> by driver <pg>
GRASS_INFO_END(4156,2)
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
GRASS_INFO_ERROR(4156,3): Unable to open database
<host=gisdb.neath-porttalbot.g
ov.uk, dbname=postgis>
GRASS_INFO_END(4156,3)
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
GRASS_INFO_WARNING(4520,1): Unable to open database
<host=gisdb.neath-porttalbot
.gov.uk, dbname=postgis> by driver <pg>
GRASS_INFO_END(4520,1)
GRASS_INFO_WARNING(4520,2): Unable open database
<host=gisdb.neath-porttalbot.go
v.uk, dbname=postgis> by driver <pg>
GRASS_INFO_END(4520,2)
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
GRASS_INFO_ERROR(4520,3): Unable to open database
<host=gisdb.neath-porttalbot.g
ov.uk, dbname=postgis>
GRASS_INFO_END(4520,3)
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
GRASS_INFO_WARNING(5048,1): Unable to open database
<host=gisdb.neath-porttalbot
.gov.uk, dbname=postgis> by driver <pg>
GRASS_INFO_END(5048,1)
GRASS_INFO_WARNING(5048,2): Unable open database
<host=gisdb.neath-porttalbot.go
v.uk, dbname=postgis> by driver <pg>
GRASS_INFO_END(5048,2)
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
GRASS_INFO_ERROR(5048,3): Unable to open database
<host=gisdb.neath-porttalbot.g
ov.uk, dbname=postgis>
GRASS_INFO_END(5048,3)
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
GRASS_INFO_WARNING(5884,1): Unable to open database
<host=gisdb.neath-porttalbot
.gov.uk, dbname=postgis> by driver <pg>
GRASS_INFO_END(5884,1)
GRASS_INFO_WARNING(5884,2): Unable open database
<host=gisdb.neath-porttalbot.go
v.uk, dbname=postgis> by driver <pg>
GRASS_INFO_END(5884,2)
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
DBMI-PostgreSQL driver error:
Unknown option in database definition for PostgreSQL: dbname=postgis
GRASS_INFO_ERROR(5884,3): Unable to open database
<host=gisdb.neath-porttalbot.g
ov.uk, dbname=postgis>
GRASS_INFO_END(5884,3)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
*db.connect output*
(Mon Feb 02 12:06:39 2015)
db.connect -p
driver: pg
database: host=gisdb.neath-porttalbot.gov.uk,dbname=postgis
schema: grass_gis
group: postgres
(Mon Feb 02 12:06:40 2015) Command finished (0 sec)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
*db.test output*
(Mon Feb 02 12:08:43 2015)
db.test test=test1
Using DB driver: pg
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: Unable to open database <host=gisdb.neath-porttalbot.gov.uk
,dbname=postgis>
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: EXECUTE: ******** ERROR ********
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: Unable to open database <host=gisdb.neath-porttalbot.gov.uk
,dbname=postgis>
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: EXECUTE: ******** ERROR ********
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: Unable to open database <host=gisdb.neath-porttalbot.gov.uk
,dbname=postgis>
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: EXECUTE: ******** ERROR ********
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: Unable to open database <host=gisdb.neath-porttalbot.gov.uk
,dbname=postgis>
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: EXECUTE: ******** ERROR ********
/usr/bin/diff: \msastore\decshome$\de254\My
Documents\Dropbox/GEODATA/PERMANENT/.tmp/unknown/4576.1: No
such file or directory
/usr/bin/diff: \msastore\decshome$\de254\My
Documents\Dropbox/GEODATA/PERMANENT/.tmp/unknown/4576.0: No
such file or directory
ERROR: RESULT: ******** ERROR ********
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: Unable to open database <host=gisdb.neath-porttalbot.gov.uk
,dbname=postgis>
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: EXECUTE: ******** ERROR ********
/usr/bin/diff: \msastore\decshome$\de254\My
Documents\Dropbox/GEODATA/PERMANENT/.tmp/unknown/4576.1: No
such file or directory
/usr/bin/diff: \msastore\decshome$\de254\My
Documents\Dropbox/GEODATA/PERMANENT/.tmp/unknown/4576.0: No
such file or directory
ERROR: RESULT: ******** ERROR ********
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: Unable to open database <host=gisdb.neath-porttalbot.gov.uk
,dbname=postgis>
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: EXECUTE: ******** ERROR ********
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: Unable to open database <host=gisdb.neath-porttalbot.gov.uk
,dbname=postgis>
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: EXECUTE: ******** ERROR ********
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: Unable to open database <host=gisdb.neath-porttalbot.gov.uk
,dbname=postgis>
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: EXECUTE: ******** ERROR ********
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: Unable to open database <host=gisdb.neath-porttalbot.gov.uk
,dbname=postgis>
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: EXECUTE: ******** ERROR ********
/usr/bin/diff: \msastore\decshome$\de254\My
Documents\Dropbox/GEODATA/PERMANENT/.tmp/unknown/4576.1: No
such file or directory
/usr/bin/diff: \msastore\decshome$\de254\My
Documents\Dropbox/GEODATA/PERMANENT/.tmp/unknown/4576.0: No
such file or directory
ERROR: RESULT: ******** ERROR ********
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: Unable to open database <host=gisdb.neath-porttalbot.gov.uk
,dbname=postgis>
DBMI-PostgreSQL driver error:
Connection failed.
fe_sendauth: no password supplied
ERROR: EXECUTE: ******** ERROR ********
CREATE TABLE grass_test1 (i1 INTEGER, d1 DOUBLE PRECISION, c1 VARCHAR(20))
INSERT INTO grass_test1 VALUES ( 1, 123.456, 'abcd' )
INSERT INTO grass_test1 VALUES ( 2, null, 'xxx' )
SELECT * FROM grass_test1
SELECT c1 FROM grass_test1 WHERE d1 < 500 / 2 AND i1 <> 2 AND c1 LIKE
'%bc%'
INSERT INTO grass_test1 VALUES ( 3, 0.0, '_\''_' )
ALTER TABLE grass_test1 ADD COLUMN i2 INTEGER
UPDATE grass_test1 SET d1 = 18.6, i2 = 987 WHERE i1 = 2
SELECT * FROM grass_test1
DROP TABLE grass_test1
(Mon Feb 02 12:08:47 2015) Command finished (3 sec)
------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------
*db.login output *
pg|host=gisdb.neath-porttalbot.gov.uk, dbname=postgis|pshapley|########
sqlite|\\msastore\decshome$\de254\My
Documents\Dropbox\GEODATA\gisdata.sqlite||
---------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------
*grass_cmd_output*
Exception in thread Thread-248:
Traceback (most recent call last):
File "C:\OSGeo4W\apps\Python27\lib\threading.py", line
810, in __bootstrap_inner
self.run()
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\gui\wxpython\gu
i_core\forms.py", line 374, in run
self.resultQ.put((requestId, self.request.run()))
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\gui\wxpython\gu
i_core\forms.py", line 289, in run
cparams[map]['dbInfo'] = gselect.VectorDBInfo(map)
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\gui\wxpython\gu
i_core\gselect.py", line 718, in __init__
self._DescribeTables() # -> self.tables
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\gui\wxpython\gu
i_core\gselect.py", line 745, in _DescribeTables
database = self.layers[layer]["database"])['cols']:
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\etc\python\gras
s\script\db.py", line 43, in db_describe
s = read_command('db.describe', flags='c', table=table,
**args)
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\etc\python\gras
s\script\core.py", line 427, in read_command
return handle_errors(returncode, stdout, args, kwargs)
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\etc\python\gras
s\script\core.py", line 310, in handle_errors
returncode=returncode)
CalledModuleError: Module run None ['db.describe', '-c',
'table=grass_gis.mosaic_height_metadata', 'driver=pg',
'database=host=gisdb.neath-porttalbot.gov.uk,
dbname=postgis'] ended with error
Process ended with non-zero return code 1. See errors in the
(error) output.
Traceback (most recent call last):
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\gui\wxpython\lm
gr\frame.py", line 1744, in OnShowAttributeTable
selection = selection)
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\gui\wxpython\db
mgr\manager.py", line 64, in __init__
**kwargs)
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\gui\wxpython\db
mgr\base.py", line 671, in __init__
self.dbMgrData['mapDBInfo'] =
VectorDBInfo(self.dbMgrData['vectName'])
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\gui\wxpython\db
mgr\vinfo.py", line 74, in __init__
VectorDBInfoBase.__init__(self, map)
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\gui\wxpython\gu
i_core\gselect.py", line 718, in __init__
self._DescribeTables() # -> self.tables
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\gui\wxpython\gu
i_core\gselect.py", line 745, in _DescribeTables
database = self.layers[layer]["database"])['cols']:
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\etc\python\gras
s\script\db.py", line 43, in db_describe
s = read_command('db.describe', flags='c', table=table,
**args)
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\etc\python\gras
s\script\core.py", line 427, in read_command
return handle_errors(returncode, stdout, args, kwargs)
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\etc\python\gras
s\script\core.py", line 310, in handle_errors
returncode=returncode)
grass.exceptions
.
CalledModuleError
:
Module run None ['db.describe', '-c',
'table=grass_gis.mosaic_height_metadata', 'driver=pg',
'database=host=gisdb.neath-porttalbot.gov.uk,
dbname=postgis'] ended with error
Process ended with non-zero return code 1. See errors in the
(error) output.
(Mon Feb 02 10:40:29 2015)
v.build map=mosaic_height_metadata at PERMANENT
Building topology for vector map <mosaic_height_metadata at PERMANENT>...
Registering primitives...
3017 primitives registered
5052 vertices registered
Building areas...
986 areas built
One isle built
Attaching islands...
Attaching centroids...
Number of nodes: 1046
Number of primitives: 3017
Number of points: 0
Number of lines: 0
Number of boundaries: 2031
Number of centroids: 986
Number of areas: 986
Number of isles: 1
(Mon Feb 02 10:40:30 2015) Command finished (0 sec)
Traceback (most recent call last):
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\gui\wxpython\lm
gr\frame.py", line 1744, in OnShowAttributeTable
selection = selection)
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\gui\wxpython\db
mgr\manager.py", line 64, in __init__
**kwargs)
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\gui\wxpython\db
mgr\base.py", line 671, in __init__
self.dbMgrData['mapDBInfo'] =
VectorDBInfo(self.dbMgrData['vectName'])
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\gui\wxpython\db
mgr\vinfo.py", line 74, in __init__
VectorDBInfoBase.__init__(self, map)
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\gui\wxpython\gu
i_core\gselect.py", line 718, in __init__
self._DescribeTables() # -> self.tables
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\gui\wxpython\gu
i_core\gselect.py", line 745, in _DescribeTables
database = self.layers[layer]["database"])['cols']:
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\etc\python\gras
s\script\db.py", line 43, in db_describe
s = read_command('db.describe', flags='c', table=table,
**args)
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\etc\python\gras
s\script\core.py", line 427, in read_command
return handle_errors(returncode, stdout, args, kwargs)
File "C:\OSGeo4W\apps\grass\grass-7.0.0RC1\etc\python\gras
s\script\core.py", line 310, in handle_errors
returncode=returncode)
grass.exceptions
.
CalledModuleError
:
Module run None ['db.describe', '-c',
'table=grass_gis.mosaic_height_metadata', 'driver=pg',
'database=host=gisdb.neath-porttalbot.gov.uk,
dbname=postgis'] ended with error
Process ended with non-zero return code 1. See errors in the
(error) output.
-------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------
*VAR output*
DB_DRIVER: pg
DB_DATABASE: host=gisdb.neath-porttalbot.gov.uk,dbname=postgis
TGISDB_DRIVER: sqlite
TGISDB_DATABASE: \\msastore\decshome$\de254\My
Documents\Dropbox\GEODATA\gisdata.sqlite
DB_SCHEMA: grass_gis
DB_GROUP: postgres
------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------
many thanks,
--
*Paul J. Shapley *MSc CGeog (GIS) FRGS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20150202/51818897/attachment-0001.html>
More information about the grass-user
mailing list