<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body smarttemplateinserted="true" text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<div class="moz-cite-prefix">On 05-04-16 08:53, Leonardo Hardtke
wrote:<br>
</div>
<blockquote
cite="mid:CAEL2NHuw30tpPNB6Un0AMSLfPkZ6FFjF7kJ_dNEKN7snXeeEYg@mail.gmail.com"
type="cite">
<div dir="ltr">Dear users,
<div>I am writing a script and I'm having problems with the
flags for mapcalc<br>
<div>
<div><font face="monospace, monospace">gscript.mapcalc('endmember_rstr.1
= null()', flags="o")</font></div>
</div>
</div>
</div>
</blockquote>
<br>
If you are using GRASS 7.+, the overwrite flag should be written in
full, i.e., <br>
<br>
<pre>gscript.mapcalc('endmember_rstr.1 = null()', flags="overwrite")</pre>
<br>
<blockquote
cite="mid:CAEL2NHuw30tpPNB6Un0AMSLfPkZ6FFjF7kJ_dNEKN7snXeeEYg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div><font face="monospace, monospace"><br>
</font></div>
<div><font face="monospace, monospace">ERROR: output map
<endmember_rstr.1> exists. To overwrite, use the</font></div>
<div><font face="monospace, monospace"> --overwrite
flag</font></div>
<div><font face="monospace, monospace">Traceback (most
recent call last):</font></div>
<div><font face="monospace, monospace"> File
"<stdin>", line 1, in <module></font></div>
<div><font face="monospace, monospace"> File
"/usr/lib/grass70/etc/python/grass/script/raster.py",
line 103, in mapcalc</font></div>
<div><font face="monospace, monospace"> quiet=quiet,
verbose=verbose, overwrite=overwrite)</font></div>
<div><font face="monospace, monospace"> File
"/usr/lib/grass70/etc/python/grass/script/core.py", line
516, in write_command</font></div>
<div><font face="monospace, monospace"> return
handle_errors(returncode, returncode, args, kwargs)</font></div>
<div><font face="monospace, monospace"> File
"/usr/lib/grass70/etc/python/grass/script/core.py", line
312, in handle_errors</font></div>
<div><font face="monospace, monospace">
returncode=returncode)</font></div>
<div><font face="monospace, monospace"> File
"/usr/lib/grass70/etc/python/grass/exceptions/__init__.py",
line 68, in __init__</font></div>
<div><font face="monospace, monospace"> msg = _("Module
run %s %s ended with error") % (module, code)</font></div>
<div><font face="monospace, monospace">TypeError: 'str'
object is not callable</font></div>
<div><br>
</div>
<div>with other modules flags are working as I expect,
like....</div>
<div><br>
</div>
<div>
<div><font face="monospace, monospace">gscript.run_command("g.region",
flags="p")</font></div>
<div><font face="monospace, monospace">projection: 1 (UTM)</font></div>
<div><font face="monospace, monospace">zone: -20</font></div>
<div><font face="monospace, monospace">datum: wgs84</font></div>
<div><font face="monospace, monospace">ellipsoid: wgs84</font></div>
<div><font face="monospace, monospace">north:
5326556.02809</font></div>
<div><font face="monospace, monospace">south:
5228355.32592</font></div>
<div><font face="monospace, monospace">west:
290546.512535</font></div>
<div><font face="monospace, monospace">east:
444008.446334</font></div>
<div><font face="monospace, monospace">nsres:
30.00326984</font></div>
<div><font face="monospace, monospace">ewres:
30.0081998</font></div>
<div><font face="monospace, monospace">rows: 3273</font></div>
<div><font face="monospace, monospace">cols: 5114</font></div>
<div><font face="monospace, monospace">cells:
16738122</font></div>
</div>
<div><br>
</div>
<div>Am I missing something?</div>
<div><br>
</div>
<div>Thanks!</div>
-- <br>
<div class="gmail_signature">
<div dir="ltr">Dr. Leonardo A. Hardtke <br>
Laboratorio de Teledetección y S.I.G. <br>
Centro Nacional Patagónico (CONICET) <br>
Bvd. Brown 2825, 9120 <br>
Puerto Madryn, Chubut, Argentina </div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a></pre>
</blockquote>
<br>
</body>
</html>