[GRASS-user] r.width.funct in correct version

Juan Lopez cubarro at gmail.com
Thu Feb 21 04:31:23 PST 2019


Thank you Margherita Di Leo, Veronica, Helmut and Nikos.

Trying to show some of my searches, I found an explanation of that
IndexError in python discussion
<https://stackoverflow.com/questions/32978575/how-to-fix-indexerror-invalid-index-to-scalar-variable/32979196>
.
I seems to be a python specific problem. But I am not sure nor able to use
it...

This is the link
https://stackoverflow.com/questions/32978575/how-to-fix-indexerror-invalid-index-to-scalar-variable/32979196

It is curious that previous grass versions works perfect with the same
r.width.funct

Regards

On Thu, Feb 21, 2019 at 8:21 AM Margherita Di Leo <diregola at gmail.com>
wrote:

> Hi,
>
> On Thu, Feb 21, 2019 at 1:04 PM Veronica Andreo <veroandreo at gmail.com>
> wrote:
>
>> I get the same error that Juan gets, both with his commands and with
>> those in the example in the manual page (and both in grass76 and trunk).
>>
>> [omitting the rest for brevity]
>>
>> r.width.funct map=dist2out image=/tmp/my_basin
>>  100%
>> Tot. cells 88407.0
>> Tot. area 8840700.0
>> Max distance 7714.591101
>> Traceback (most recent call last):
>>   File "/home/veroandreo/.grass7/addons/scripts/r.width.funct", line 135,
>> in <module>
>>     sys.exit(main())
>>   File "/home/veroandreo/.grass7/addons/scripts/r.width.funct", line 84,
>> in main
>>     prc[0,0] , prc[0,1] = findint(kl,0.05) , 0.05
>>   File "/home/veroandreo/.grass7/addons/scripts/r.width.funct", line 128,
>> in findint
>>     z1, z2, f1, f2 = kl[int(Xf[0])][0], kl[int(Xf[0]-1)][0],
>> kl[int(Xf[0])][1], kl[int(Xf[0]-1)][1]
>> IndexError: invalid index to scalar variable.
>>
>> No idea...
>>
>> Maybe Madi can help us out here :)
>>
>
>  I wish :-) The fact is that I don't know what caused the error because it
> was working fine previously. As soon as I have time I will look into it,
> but if someone else has idea of what's causing the error, it's more than
> welcome.
>
> --
> Margherita Di Leo
>


-- 
Prof. Juan Ygnacio López Hernández Ing. MSc. PhD.
Universidad de Los Andes <http://www.ula.ve/>
Escuela de Ingeniería Forestal
Mérida, Venezuela.
Tel. ++58 426 3185690
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20190221/28d8743d/attachment-0001.html>


More information about the grass-user mailing list