[GRASS-user] Looping r.sun.hourly with Python script fails

Anna Petrášová kratochanna at gmail.com
Wed Apr 1 04:49:24 PDT 2015


On Wed, Apr 1, 2015 at 6:46 AM, Pietro <peter.zamb at gmail.com> wrote:

> Dear Umberto,
>
> On Wed, Apr 1, 2015 at 11:46 AM, umberto.minora <umberto.minora at unimi.it>
> wrote:
> >   File "C:\OSGeo4W\apps\grass\grass-7.0.0\etc\python\grass\p
> > ygrass\modules\interface\parameter.py", line 150, in
> > __init__
> >     self.values = [self.type(i) for i in diz['values']]
> > ValueError: invalid literal for int() with base 10: '1-'
>
> The problem here is that the r.sun.hourly define the parmeter nprocs as:
>
> {{{
> #%option
> #% key: nprocs
> #% type: integer
> #% description: Number of r.sun processes to run in parallel
> #% options: 1-
> #% answer: 1
> #%end
> }}}
>
> To me this "#% options: 1-" is wrong, and it does not make to much
> sense. I'm keen on removing this row.
>
> Vaclav and Anna, what is it your feeling?
>

I think it makes sense, it means greater or equal to 1. It is supported by
the parser, so you might find more of these cases in other modules.

Best,

Anna

>
> All the best
>
> Pietro
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20150401/ec78230e/attachment.html>


More information about the grass-user mailing list