[GRASS-user] GIS_LOCK and/or default database problem(s)

George Washington gws293 at hotmail.com
Tue Jun 2 17:10:19 EDT 2009

Hi, I am having some problems trying to create a new LOCATION and MAPSET with default MySql database, programmatically, using Python (Ubuntu 9.04, GRASS 6.4RC4). I am running the following (external to GRASS!):

#Create the new LOCATION and MAPSET
grass.read_command("g.proj",flags='pc', georef='contours.shp', location='lower')
grass.read_command("g.gisenv", set='LOCATION_NAME=lower')
grass.read_command("g.mapset",flags='c',mapset='Contours', location='lower')
grass.read_command("g.gisenv", set='MAPSET=Contours')
#Set database default, the empty database was created beforehand with phpMyAdmin.

The "g.mapset" command results in "ERROR: Unable to read GIS_LOCK environment variable".
The location and mapset however are created, seemingly correctly, but the default database (and the VAR file) is set to dbf, not MySql, ie after running "db.connect" I receive the following message:

Default driver / database set to:
driver: dbf

Are the two problems related or am I missing a crutial step here? How can I force MySql to be the default for the new LOCATION/MAPSET?
Any help would be appreciated.

View photos of singles in your area Click Here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20090602/8d8487f7/attachment.html

More information about the grass-user mailing list