[GRASSGUI] testing wxgrass

Moritz Lennert mlennert at club.worldonline.be
Tue Mar 27 12:24:11 EDT 2007


On 27/03/07 16:32, Michael Barton wrote:

>>
>> - Contrary to what I said before, I still have a problem displaying
>> several layers. I can add a first layer, but when I try to add a second
>> layer, I get the following error message, the second layer is unusable
>> (only transparency field visible, see attached image), and I cannot
>> erase it either:
>>
>> Traceback (most recent call last):
>>    File "/usr/lib/grass/etc/wx/wxgui.py", line 460, in addVector
>>      self.SetTree('vector')
>>    File "/usr/lib/grass/etc/wx/wxgui.py", line 487, in SetTree
>>      self.maptree.AddLayer(disp_idx, layertype)
>>    File "/usr/lib/grass/etc/wx/gui_modules/wxgui_utils.py", line 151, in
>> AddLayer    if (self.layer_selected and self.layer_selected !=
>> self.GetRootItem() and
>>    File 
>> "/usr/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/_controls.py",
>> line 4996, in __ne__
>>      return _controls_.TreeItemId___ne__(*args, **kwargs)
>> TypeError: in method 'TreeItemId___ne__', expected argument 2 of type
>> 'wxTreeItemId const *'
> 
> These seem to be failing where an if clause breaks across 2 lines. As per
> normal Python syntax, this clause is enclosed in parentheses and shouldn't
> need a backslash. But your system is not reading it correctly. I've added
> the backslash at the line break (redundant but no harm done on my system at
> least). Try it now and see if it clears things up.

Nope, that's apparently not the problem. I tried by just removing the 
newline between the two lines, and I still get:

Traceback (most recent call last):
   File "/usr/lib/grass/etc/wx/wxgui.py", line 444, in addRaster
     self.SetTree('raster')
   File "/usr/lib/grass/etc/wx/wxgui.py", line 487, in SetTree
     self.maptree.AddLayer(disp_idx, layertype)
   File "/usr/lib/grass/etc/wx/gui_modules/wxgui_utils.py", line 151, in 
AddLayer    if (self.layer_selected and self.layer_selected != 
self.GetRootItem() and self.layertype[self.layer_selected] != 'group'):
   File 
"/usr/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/_controls.py", 
line 4996, in __ne__
     return _controls_.TreeItemId___ne__(*args, **kwargs)
TypeError: in method 'TreeItemId___ne__', expected argument 2 of type 
'wxTreeItemId const *'

Sounds more like a wrong data type being sent to a method...

Moritz




More information about the grass-gui mailing list