[GRASS-dev] [GRASS GIS] #3058: unexpected behavior/error message in r.diversity?

GRASS GIS trac at osgeo.org
Fri Jun 10 05:31:39 PDT 2016


#3058: unexpected behavior/error message in r.diversity?
-------------------------+-------------------------
  Reporter:  veroandreo  |      Owner:  grass-dev@…
      Type:  defect      |     Status:  new
  Priority:  normal      |  Milestone:  7.2.0
 Component:  Addons      |    Version:  svn-trunk
Resolution:              |   Keywords:
       CPU:  x86-64      |   Platform:  Linux
-------------------------+-------------------------

Comment (by veroandreo):

 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
 [https://grass.osgeo.org/grass70/manuals/addons/r.diversity.html
 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>
     sys.exit(main())
   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?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3058#comment:1>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list