Hi devs,
I am trying to create a new mapset and open that mapset using g.mapset.
When doing this from the command line, I can import layers in the new
mapset using r.in.gdal without problems.However, running this in a
python script doesn't work. E.g., when I run:
gs.run_command("g.mapset", flags="c", mapset="LST", location="latlon_clark66")
Next, I try to import a layer:
infile="lst_01.tif"
outfile="lst_01"
gs.run_command("r.in.gdal", input=infile, output=outfile)
This gives me the error:
gs.run_command("r.in.gdal", input="lst_01.tif", output="lst_01")
Traceback (most recent call last):
File "<ipython-input-18-2c415e16d79f>", line 1, in <module>
gs.run_command("r.in.gdal", input="lst_01.tif", output="lst_01")
File "/usr/local/grass7/grass-7.5.svn/etc/python/grass/script/core.py", line
421, in run_command
return handle_errors(returncode, returncode, args, kwargs)
File "/usr/local/grass7/grass-7.5.svn/etc/python/grass/script/core.py", line
332, in handle_errors
returncode=returncode)
CalledModuleError: Module run None ['r.in.gdal', 'input=lst_01.tif',
'output=lst_01'] ended with error
Process ended with non-zero return code 1. See errors in the (error) output.
Any idea why this doesn't work?
Best wishes,
Paulo
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev