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

Pietro peter.zamb at gmail.com
Wed Apr 1 02:32:52 PDT 2015


Dear Umberto,

On Wed, Apr 1, 2015 at 10:57 AM, umberto.minora <umberto.minora at unimi.it> wrote:
> \r.sun.hourly_daily_script.py", line 16, in <module>
>     r.sun.hourly(flags="b",
> AttributeError: 'Module' object has no attribute 'hourly'

the problem here is that in python the dot has a special meaning,
therefore when you use the shortcut you have to convert the '.' =>
'_'.
Therefore if you change line 16, as:

{{{
[cut]
r.sun_hourly(flags="b",
[cut]
}}}

this should fix the AttributeError exception.

Best regards

Pietro


More information about the grass-user mailing list