Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2211 closed defect (fixed)

g.gui.iclass raise a PyAssertionError

Reported by: zarch Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Display Version: svn-trunk
Keywords: g.gui.iclass, wxPython 3 Cc:
CPU: Unspecified Platform: Unspecified

Description

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

Change History (3)

comment:1 by annakrat, 11 years ago

Keywords: wxPython 3 added

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

in reply to:  1 ; comment:2 by zarch, 11 years ago

Resolution: fixed
Status: newclosed

Replying to 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

in reply to:  2 comment:3 by annakrat, 11 years ago

Replying to zarch:

Replying to 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

Note: See TracTickets for help on using tickets.