[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')
grass.read_command("g.mapsets",flags='p',addmapset='Contours')
#Set database default, the empty database was created beforehand with phpMyAdmin.
c=grass.read_command("db.connect",flags='c',driver='mysql',database='LOWER')

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
database: $GISDBASE/$LOCATION_NAME/$MAPSET/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.
Thanks
George


_________________________________________________________________
View photos of singles in your area Click Here
http://dating.ninemsn.com.au/search/search.aspx?exec=go&tp=q&gc=2&tr=1&lage=18&uage=55&cl=14&sl=0&dist=50&po=1&do=2&trackingid=1046138&r2s=1&_t=773166090&_r=WLM_EndText
-------------- 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