[prev in list] [next in list] [prev in thread] [next in thread]
List: grass-dev
Subject: Re: [GRASS-dev] KeyError with python grass.raster_info() in GRASS 7
From: Johannes Radinger <johannesradinger () gmail ! com>
Date: 2013-08-28 10:54:37
Message-ID: CABsGe_zuCsHO95w+N5c32J8B+sgGejReo9ww+axo1XPbXjdqrQ () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
oh sorry... problem solved! There was just the map "test3" not existing, so
the called r.info could not retrieve any information.
So there is no problem with raster_info, it was just my fault :(
/johannes
On Wed, Aug 28, 2013 at 12:30 PM, Johannes Radinger <
johannesradinger@gmail.com> wrote:
> Hi,
>
> when I try to get the max value of a raster map via python and
> grass.raster_info() in GRASS70 (revision 57523), I get following error:
>
>
> grass.raster_info("test3")['max']
> D1/1: grass.script.core.start_command(): r.info -gre map=test3
> Traceback (most recent call last):
> File "<input>", line 1, in <module>
> File "/usr/local/grass-7.0.svn/etc/python/grass/script/raster.py", line
> 80, in raster_info
> kv[k] = float_or_null(kv[k])
> KeyError: 'min'
>
> Is that easy to fix?
>
> /Johannes
>
[Attachment #5 (text/html)]
<div dir="ltr">oh sorry... problem solved! There was just the map "test3" \
not existing, so<div>the called <a href="http://r.info">r.info</a> could not retrieve \
any information.</div><div>So there is no problem with raster_info, it was just my \
fault :(</div> <div><br></div><div>/johannes</div></div><div \
class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 28, 2013 at 12:30 \
PM, Johannes Radinger <span dir="ltr"><<a href="mailto:johannesradinger@gmail.com" \
target="_blank">johannesradinger@gmail.com</a>></span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div>Hi,<br><br>when I try to get the max \
value of a raster map via python and grass.raster_info() in GRASS70 (revision 57523), \
I get following error:<br> \
<br><br>grass.raster_info("test3")['max']<br>
D1/1: grass.script.core.start_command(): <a href="http://r.info" \
target="_blank">r.info</a> -gre map=test3<br>Traceback (most recent call last):<br> \
File "<input>", line 1, in <module><br> File \
"/usr/local/grass-7.0.svn/etc/python/grass/script/raster.py", line 80, in \
raster_info<br>
kv[k] = float_or_null(kv[k])<br>KeyError: 'min'<br><br></div><div>Is that \
easy to fix?<span class="HOEnZb"><font color="#888888"><br></font></span></div><span \
class="HOEnZb"><font color="#888888"><div><br></div> \
<div>/Johannes</div></font></span></div> </blockquote></div><br></div>
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic