Hi, On Jan 19, 2015 7:07 PM, "Pierric de Laborie" <[email protected]> wrote: > > Hi, > I am using Grass 7 beta 4 on Windows. > > After importing Landsat raster bands, I use the following command that works fine. > > i.landsat.toar --overwrite --verbose input=LC81900362014284LGN00_B output=ator metfile=C:\Users\Administrator\Downloads\LC81900362014284LGN00\LC81900362014284LGN00\LC81900362014284LGN00_MTL.txt > > But when I try to do the same in the Python console (same software), I get the following error (please see below after code) complaining for the input prefix parameter. Note that I get the same error in my Python script on Linux using Grass7, so I supposed it is not related to the os. I guess it is caused by an error in the calling syntax (?) > > import grass.script as grass -> OK > > from grass.pygrass.modules.shortcuts import imagery as i -> OK > > i.landsat_toar(input_prefix="LC81900362014284LGN00_B",output_prefix=outpref,metfile="LC81900362014284LGN00_MTL.txt", overwrite="True", quiet="False") > > Traceback (most recent call last): > File "<input>", line 1, in <module> > File "C:\Program Files (x86)\GRASS GIS 7.0.0beta4\etc\python\grass\pygrass\modules\interface\module.py", line 602, in __call__ > raise ParameterError('%s is not a valid parameter.' % key) > ParameterError: input_prefix is not a valid parameter.
In beta4 we have basically concluded the parameter name standardization which is essentially a simplification. In this case the parameter has been renamed to 'input'. You can look it up here: https://trac.osgeo.org/grass/wiki/Grass7/NewFeatures#Imagerymodulechanges Hope this helps Markus
_______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
