[GRASS-user] SQLite driver errors: `Unable to open database'

Martin Landa landa.martin at gmail.com
Sun May 8 05:29:18 EDT 2011


Hi,

2011/5/8 Micha Silver <micha at arava.co.il>:
> GRASS 6.4.0 (UTM36):~ > eval `g.gisenv`
> GRASS 6.4.0 (UTM36):~ > db.connect driv=sqlite
> database=$GISDBASE/$LOCATION_NAME/$MAPSET/geodata.db
> GRASS 6.4.0 (UTM36):~ > db.connect -p
> driver:sqlite
> database:/home/micha/geodata/grass/UTM36/Israel/geodata.db
> schema:
> group:

first of all, you don't need to run `g.gisenv`, just

$ db.connect driv=sqlite database='$GISDBASE/$LOCATION_NAME/$MAPSET/geodata.db'

is enough.

> GRASS 6.4.0 (UTM36):~ > ll /home/micha/geodata/grass/UTM36/Israel/geodata.db
> ls: cannot access /home/micha/geodata/grass/UTM36/Israel/geodata.db: No such
> file or directory

right, the database should be created when it's accessed.

After running eg. `g.copy`

$ eval `g.gisenv`
$ file $GISDBASE/$LOCATION_NAME/$MAPSET/geodata.db
/home/martin/grassdata/nc_spm_08/landa6/geodata.db: SQLite 3.x database

The reported behaviour seems to be bug in winGRASS.

Martin

-- 
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa


More information about the grass-user mailing list