[GRASS-dev] [GRASS GIS] #2211: g.gui.iclass raise a PyAssertionError

#2211: g.gui.iclass raise a PyAssertionError
--------------------------+-------------------------------------------------
Reporter: zarch | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Keywords: g.gui.iclass | Platform: Unspecified
      Cpu: Unspecified |
--------------------------+-------------------------------------------------
I'm trying to use g.gui.iclass but it seems broken I got this error when I
try to add a class with the class manager.

{{{
Traceback (most recent call last):
   File
"/home/pietro/docdat/src/gis/grass/grass_trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/iclass/dialogs.py", line
318, in OnAddCategory

self.catList.AddCategory(cat = cat, name = defaultName,
color = defaultColor)
   File
"/home/pietro/docdat/src/gis/grass/grass_trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/iclass/dialogs.py", line
414, in AddCategory

self.stats_data.AddStatistics(cat, name, color)
   File
"/home/pietro/docdat/src/gis/grass/grass_trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/iclass/statistics.py",
line 58, in AddStatistics

self.statisticsAdded.emit(cat = cat, name = name, color =
color)
   File
"/home/pietro/docdat/src/gis/grass/grass_trunk/dist.x86_64
-unknown-linux-gnu/etc/python/grass/pydispatch/signal.py",
line 229, in emit

dispatcher.send(signal=self, *args, **kwargs)
   File
"/home/pietro/docdat/src/gis/grass/grass_trunk/dist.x86_64
-unknown-linux-
gnu/etc/python/grass/pydispatch/dispatcher.py", line 343, in
send

**named
   File
"/home/pietro/docdat/src/gis/grass/grass_trunk/dist.x86_64
-unknown-linux-
gnu/etc/python/grass/pydispatch/robustapply.py", line 57, in
robustApply

return receiver(*arguments, **named)
   File
"/home/pietro/docdat/src/gis/grass/grass_trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/iscatt/controllers.py",
line 1055, in AddCategory

self.cats_mgr.AddCategory(cat_id = cat, name = name, color =
color, nstd = stats.nstd)
   File
"/home/pietro/docdat/src/gis/grass/grass_trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/iscatt/controllers.py",
line 679, in AddCategory

color = self.cats[cat_id]["color"] )
   File
"/home/pietro/docdat/src/gis/grass/grass_trunk/dist.x86_64
-unknown-linux-gnu/etc/python/grass/pydispatch/signal.py",
line 229, in emit

dispatcher.send(signal=self, *args, **kwargs)
   File
"/home/pietro/docdat/src/gis/grass/grass_trunk/dist.x86_64
-unknown-linux-
gnu/etc/python/grass/pydispatch/dispatcher.py", line 343, in
send

**named
   File
"/home/pietro/docdat/src/gis/grass/grass_trunk/dist.x86_64
-unknown-linux-
gnu/etc/python/grass/pydispatch/robustapply.py", line 57, in
robustApply

return receiver(*arguments, **named)
   File
"/home/pietro/docdat/src/gis/grass/grass_trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/iscatt/frame.py", line
403, in Update

self.RefreshItems(0, len(self.cats_mgr.GetCategories()))
   File "/usr/lib64/python2.7/site-
packages/wx-3.0-gtk2/wx/_controls.py", line 4635, in
RefreshItems

return _controls_.ListCtrl_RefreshItems(*args, **kwargs)
wx._core
.
PyAssertionError
:
C++ assertion "lineTo < GetItemCount()" failed at
./src/generic/listctrl.cpp(1923) in RefreshLines(): invalid
line range
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2211&gt;
GRASS GIS <http://grass.osgeo.org>

#2211: g.gui.iclass raise a PyAssertionError
--------------------------------------+-------------------------------------
Reporter: zarch | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Keywords: g.gui.iclass, wxPython 3 | Platform: Unspecified
      Cpu: Unspecified |
--------------------------------------+-------------------------------------
Changes (by annakrat):

  * keywords: g.gui.iclass => g.gui.iclass, wxPython 3

Comment:

I fixed it hopefully in r59207. Please mention next time that you use
wxPython 3, as a keyword for example.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2211#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#2211: g.gui.iclass raise a PyAssertionError
--------------------------+-------------------------------------------------
  Reporter: zarch | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Resolution: fixed | Keywords: g.gui.iclass, wxPython 3
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by zarch):

  * status: new => closed
  * resolution: => fixed

Comment:

Replying to [comment:1 annakrat]:
> I fixed it hopefully in r59207.

Yes, now it works fine, thanks!

> Please mention next time that you use wxPython 3, as a keyword for
example.

Sorry about that, you are right, I forgot to mention this important point!

Sometime I have some warning like GRASS is using deprecating methods,
should I report this warning somewhere, are you using wxPython3 too?
for example at the moment if I run g.gui.iclass I got:

{{{
G70 edi/pietro> g.gui.iclass
/home/pietro/docdat/src/gis/grass/grass_trunk/dist.x86_64-unknown-linux-
gnu/scripts/g.gui.iclass:101: wxPyDeprecationWarning: Using deprecated
class PySimpleApp.
   app = wx.PySimpleApp()
}}}

Let me know If I should report this kind of things somewhere, best regards

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2211#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#2211: g.gui.iclass raise a PyAssertionError
--------------------------+-------------------------------------------------
  Reporter: zarch | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: Display | Version: svn-trunk
Resolution: fixed | Keywords: g.gui.iclass, wxPython 3
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------

Comment(by annakrat):

Replying to [comment:2 zarch]:
> Replying to [comment:1 annakrat]:
> > I fixed it hopefully in r59207.
>
> Yes, now it works fine, thanks!
>
>
> > Please mention next time that you use wxPython 3, as a keyword for
example.
>
> Sorry about that, you are right, I forgot to mention this important
point!
>
> Sometime I have some warning like GRASS is using deprecating methods,
should I report this warning somewhere, are you using wxPython3 too?

I am not using yet, but I have some 2.9 version on my computer so I can
test it at least.

> for example at the moment if I run g.gui.iclass I got:
>
> {{{
> G70 edi/pietro> g.gui.iclass
> /home/pietro/docdat/src/gis/grass/grass_trunk/dist.x86_64-unknown-linux-
gnu/scripts/g.gui.iclass:101: wxPyDeprecationWarning: Using deprecated
class PySimpleApp.
> app = wx.PySimpleApp()
> }}}
>
I fixed this one in r59221.

> Let me know If I should report this kind of things somewhere, best
regards
>

yes, it would be good. There is already a ticket on some deprecation
warning as far as I remember but I am not able to find it now

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2211#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>