<div dir="ltr"><div><div>I get the same error after trying with your suggestion! I tried to define rasters in different ways, like<br></div>>> c = ["costante"] , <br></div>but nothing seems to change<br></div><br><div class="gmail_quote"><div dir="ltr">Il giorno mer 12 dic 2018 alle ore 10:22 Moritz Lennert <<a href="mailto:mlennert@club.worldonline.be">mlennert@club.worldonline.be</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 12/12/18 12:59, Alessandro Sebastiani wrote:<br>
> dear all,<br>
> i'm dealing this time with r.mapcalc. I have different rasters which i <br>
> grouped using g.list.<br>
> Now r_list contains all my raster. I want to multiply those rasters to <br>
> another raster (called "costante")  in order to obtain a new map, that i <br>
> want to call as r followed by the letter "k"<br>
> Here it is what i've done:<br>
> import grass.script as gscript<br>
>  >>> r_list = gscript.read_command("g.list" , type = "rast" <br>
> ).strip().split("\n")<br>
>  >>> c = " costante"<br>
>  >>> for r in r_list:<br>
>  >>>     gscript.mapcalc ( " %s = %s * %s "  % ((r+"k") , r , c))<br>
<br>
Try<br>
<br>
" %sk = %s * %s "  % (r , r , c) "<br>
<br>
Moritz<br>
<br>
</blockquote></div>