<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Ok. So now my code is:</p>
<p>Â Â Â compregion = grass.parse_command("r.in.xyz", input=xyz,
separator="space", flags="sg",
output="bbox",parse=(grass.parse_key_val, {'sep': '='}))<br>
   print(compregion)<br>
   g.region(res="1", flags="p", **compregion)</p>
<p>and the output: <br>
</p>
<p>{u'n': u'5611999 s=5610000 e=32361999 w=32360000 b=159.04
t=206.46'}<br>
ERROR: Invalid input <n=5611999 s=5610000 e=32361999 w=32360000
b=159.04<br>
      t=206.46><br>
Traceback (most recent call last):<br>
 File "grass_scripts/error_script.py", line 40, in <module><br>
   main()<br>
 File "grass_scripts/error_script.py", line 38, in main<br>
   g.region(res="1", flags="p", **compregion)<br>
 File
"/home/jreith/source/grass-7.4.svn/dist.x86_64-pc-linux-gnu/etc/python/grass/pygrass/modules/interface/module.py",
line 648, in __call__<br>
   return self.run()<br>
 File
"/home/jreith/source/grass-7.4.svn/dist.x86_64-pc-linux-gnu/etc/python/grass/pygrass/modules/interface/module.py",
line 769, in run<br>
   self.wait()<br>
 File
"/home/jreith/source/grass-7.4.svn/dist.x86_64-pc-linux-gnu/etc/python/grass/pygrass/modules/interface/module.py",
line 790, in wait<br>
   module=self.name, errors=stderr)<br>
grass.exceptions.CalledModuleError: Module run g.region g.region
n=5611999 s=5610000 e=32361999 w=32360000 b=159.04 t=206.46 res=1
-p ended with error<br>
Process ended with non-zero return code 1. See errors in the
(error) output.<br>
#########################</p>
<p>It seems like my last error disappeared, but now I have a new
one.</p>
<p>running < g.region n=5611999 s=5610000 e=32361999 w=32360000
b=159.04 t=206.46 res=1 -p > from command line in GRASS works
just fine.</p>
<p>Any help appreciated</p>
<p>Jonathan<br>
</p>
<p><br>
</p>
<br>
<div class="moz-cite-prefix">Am 19.02.2018 um 18:49 schrieb Pietro:<br>
</div>
<blockquote type="cite"
cite="mid:CAM_TVRLGitoZ4hBJzKREbYQuhRm2A2iqa61ak71_i0V1k+hUAg@mail.gmail.com">
<div dir="auto">Thank you Anna I did not noticed the underscor...<br>
<div class="gmail_extra" dir="auto"><br>
<div class="gmail_quote">On 19 Feb 2018 4:41 p.m., "Jonathan
Reith" <<a href="mailto:reith@mundialis.de"
moz-do-not-send="true">reith@mundialis.de</a>> wrote:
<blockquote class="quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<blockquote>
<p> Â print(compregion)<br>
 g.region(compregion,res="1", flags="p")</p>
</blockquote>
</div>
</blockquote>
</div>
</div>
<div dir="auto">you are hassling the dictionary to a region, but
you have to unpack the dictionary just write:</div>
<div dir="auto"><br>
</div>
<div dir="auto">...</div>
<div dir="auto"><br>
</div>
<div dir="auto"><span style="font-family:sans-serif">g.region(res="1",
flags="p", **compregion)</span><br>
</div>
<div dir="auto"><span style="font-family:sans-serif"><br>
</span></div>
<div dir="auto"><span style="font-family:sans-serif">the two *
unpack the dictionary.</span></div>
<div dir="auto"><span style="font-family:sans-serif"><br>
</span></div>
<div dir="auto"><span style="font-family:sans-serif">Have fun!</span></div>
<div dir="auto"><span style="font-family:sans-serif"><br>
</span></div>
<div dir="auto"><span style="font-family:sans-serif">Pietro</span></div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Studentische Hilfskraft
mundialis GmbH & Co. KG
Firmensitz: Kölnstraße 99, 53111 Bonn
Registergericht: Amtsgericht Bonn, HRA 8528
vertreten durch: mundialis Verwaltungsgesellschaft mbH
Geschäftsführer:
Dr. rer. nat. Markus Neteler
Dipl.-Geogr. Hinrich Paulsen
Dipl.-Geogr. Till Adams
Tel. +49 (0)228 - 38 75 80 - 80
Fax. +49 (0)228 - 96 28 99 57
info [at] mundialis [dot] de
Internet: <a class="moz-txt-link-abbreviated" href="http://www.mundialis.de">www.mundialis.de</a></pre>
</body>
</html>