[GRASS-user] ERROR 1: TIFFOpen: No error Using GDAL data type <Byte>

umberto.minora umberto.minora at unimi.it
Tue Apr 7 02:00:56 PDT 2015


I am using "r.out.gdal" function within a Python script through the command
console of grass7.
I am calling it by doing:

{{{
from grass.script.core import run_command

run_command("r.out.gdal",
				flags="c",
				type="Byte",
				input="prova"+ str(m+1),
				output=outFolder+ "\prova"+ str(m+1)+ ".tif",
				nodata=255)
}}}

I am getting this error:

{{{
ERROR 1: TIFFOpen:D:\UMBE\PhD\Nepal\khumbu_article\shadow
_sun_hourly\prova_hourly_shadow\prova1.tif: No error
Using GDAL data type <Byte>
ERROR: Impossibile creare il dataset
<D:\UMBE\PhD\Nepal\khumbu_article\shadow
_sun_hourly\prova_hourly_shadow\prova1.tif> usando il driver <GTiff>
Traceback (most recent call last):
  File "D:\UMBE\PhD\Nepal\khumbu_article\shadow\r_sun_hourly
\prova_r-sun-hourly.py", line 39, in <module>
    nodata=255)
  File "C:\OSGeo4W\apps\grass\grass-7.0.0\etc\python\grass\s
cript\core.py", line 375, in run_command
    return handle_errors(returncode, returncode, args,
kwargs)
  File "C:\OSGeo4W\apps\grass\grass-7.0.0\etc\python\grass\s
cript\core.py", line 310, in handle_errors
    returncode=returncode)
grass.exceptions.CalledModuleError: Module run None
['r.out.gdal', '-c', 'output=D:\\UMBE\\PhD\\Nepal\\khumbu_ar
ticle\\shadow\r_sun_hourly\\prova_hourly_shadow\\prova1.tif'
, 'nodata=255', 'type=Byte', 'input=prova1'] ended with
error
Process ended with non-zero return code 1. See errors in the
(error) output.
}}}

Anyway, if I use the same call from the command line (not calling the Python
script) I have my "prova1.tif" written correctly in the folder I chose. Why?
Any guess?



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/ERROR-1-TIFFOpen-No-error-Using-GDAL-data-type-Byte-tp5200187.html
Sent from the Grass - Users mailing list archive at Nabble.com.


More information about the grass-user mailing list