Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3058 closed defect (fixed)

unexpected behavior/error message in r.diversity?

Reported by: veroandreo Owned by: grass-dev@…
Priority: normal Milestone: 7.2.0
Component: Addons Version: svn-trunk
Keywords: Cc:
CPU: x86-64 Platform: Linux


I had assumed as in the last example of r.diversity manual that if I used only 'exclude' it would pick up that I wanted the other three methods. This was the command I used and the error, even though I was using only 'exclude':

r.diversity input=my_classif prefix=diverity size=3 exclude=renyi
ERROR: You can either use 'method' or 'exclude' option but not both

Anyway, the complementary did work :)

r.diversity input=my_classif prefix=diver size=3 method=simpson,shannon,pielou

Change History (3)

comment:1 by veroandreo, 8 years ago

Found another error that does not fit what manual page says. If I use "size=5-9" as it seems to be allowed according to r.diversity examples, I get the following error:

GRASS 7.3.svn (lat_long):~ > r.diversity input=my_classif prefix=diver size=5-9 method=simpson
Traceback (most recent call last):
  File "/home/veroandreo/.grass7/addons/scripts/r.diversity", line 283, in <module>
  File "/home/veroandreo/.grass7/addons/scripts/r.diversity", line 116, in main
    resolution = checkValues(res)
  File "/home/veroandreo/.grass7/addons/scripts/r.diversity", line 272, in checkValues
    reso = range(reso[0], reso[1] + 1, 2)
TypeError: range() integer end argument expected, got float.

Is this an error or just that documentation is wrong or outdated?

comment:2 by lucadelu, 8 years ago

Both error should be fixed in r68676.

comment:3 by veroandreo, 8 years ago

Resolution: fixed
Status: newclosed

Both errors dissapeared. Works as expected now.

Thanks :)

Version 0, edited 8 years ago by veroandreo (next)
Note: See TracTickets for help on using tickets.