[GRASS-user] Problem with GRASS 6.4RC6 and wxPython 2.8.11 on CentOS 5.5 x86_64

Hello,

I'm working on the RPM packaging of GRASS 6.4 for Enterprise Linux
(http://wiki.osgeo.org/wiki/Enterprise_Linux_GIS).

We rely on the EPEL repository for many libraries and since their
upgrade of wxGTK / wxPython to 2.8.11 the wx UI of GRASS is broken.

We get the stacktrace below:

...
  File "/usr/lib64/grass-6.4.0RC6/etc/wxpython/gui_modules/wxgui_utils.py",
line 73, in __init__
    super(LayerTree, self).__init__(parent, id, pos, size,
style=style, ctstyle=ctstyle)
  File "/usr/lib64/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/lib/mixins/treemixin.py",
line 488, in __init__
    super(DragAndDrop, self).__init__(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'ctstyle'

(complete stack at the end of the mail)

This may also be due to the update of other component when updating to
CentOS 5.5, but I rather suspect the wx update.
Anyhow the wx UI was working on CentOS 5.4 with wxGTK 2.8.9 / wxPython 2.8.7 .

Can you please help me analyze this issue further?

Thanks in advance!

Mathieu

Welcome to GRASS 6.4.0RC6 (2010)
GRASS homepage: http://grass.osgeo.org/
This version running thru: Bash Shell (/bin/bash)
Help is available with the command: g.manual -i
See the licence terms with: g.version -c
If required, restart the GUI with: g.gui wxpython
When ready to quit enter: exit

GRASS 6.4.0RC6 (EasternBalkans2010):~ >
WARNING: Vector digitizer is not available (No module named grass6_wxvdigit).

Note that the vector digitizer is currently not working under MS
Windows (hopefully this will be fixed soon). Please keep an eye out
for updated versions of GRASS.
Traceback (most recent call last):
  File "/usr/lib64/grass-6.4.0RC6/etc/wxpython/wxgui.py", line 1819, in ?
    sys.exit(main())
  File "/usr/lib64/grass-6.4.0RC6/etc/wxpython/wxgui.py", line 1812, in main
    app = GMApp(workspaceFile)
  File "/usr/lib64/grass-6.4.0RC6/etc/wxpython/wxgui.py", line 1737, in __init__
    wx.App.__init__(self, False)
  File "/usr/lib64/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 7978, in __init__
    self._BootstrapApp()
  File "/usr/lib64/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 7552, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "/usr/lib64/grass-6.4.0RC6/etc/wxpython/wxgui.py", line 1755, in OnInit
    workspace = self.workspaceFile)
  File "/usr/lib64/grass-6.4.0RC6/etc/wxpython/wxgui.py", line 185, in __init__
    self.NewDisplay(show=False)
  File "/usr/lib64/grass-6.4.0RC6/etc/wxpython/wxgui.py", line 1236,
in NewDisplay
    auimgr=self._auimgr, showMapDisplay=show)
  File "/usr/lib64/grass-6.4.0RC6/etc/wxpython/gui_modules/wxgui_utils.py",
line 73, in __init__
    super(LayerTree, self).__init__(parent, id, pos, size,
style=style, ctstyle=ctstyle)
  File "/usr/lib64/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/lib/mixins/treemixin.py",
line 488, in __init__
    super(DragAndDrop, self).__init__(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'ctstyle'

We rely on the EPEL repository for many libraries and since their
upgrade of wxGTK / wxPython to 2.8.11 the wx UI of GRASS is broken.

Any idea on how I could analyse further what the problem is?

Maybe this list is not the right place where to ask?
Should I write to a developer mailing list directly?

Mathieu Baudier wrote:

We rely on the EPEL repository for many libraries and since their
upgrade of wxGTK / wxPython to 2.8.11 the wx UI of GRASS is broken.

We get the stacktrace below:

...
  File "/usr/lib64/grass-6.4.0RC6/etc/wxpython/gui_modules/wxgui_utils.py",
line 73, in __init__
    super(LayerTree, self).__init__(parent, id, pos, size,
style=style, ctstyle=ctstyle)
  File "/usr/lib64/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/lib/mixins/treemixin.py",
line 488, in __init__
    super(DragAndDrop, self).__init__(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'ctstyle'

wxPython 2.8.11 isn't backwards compatible with 2.8.10. It has been
discussed in slightly more detail here:

http://lists.osgeo.org/pipermail/grass-dev/2010-June/050766.html

--
Glynn Clements <glynn@gclements.plus.com>

wxPython 2.8.11 isn't backwards compatible with 2.8.10. It has been
discussed in slightly more detail here:

Does this mean that we have to downgrade wxPython somehow, or can we
expect it to be fixed in GRASS 6.4 ?

Thanks for your help!

On Tue, Jun 8, 2010 at 6:35 PM, Glynn Clements <glynn@gclements.plus.com> wrote:

Mathieu Baudier wrote:

We rely on the EPEL repository for many libraries and since their
upgrade of wxGTK / wxPython to 2.8.11 the wx UI of GRASS is broken.

We get the stacktrace below:

...
File "/usr/lib64/grass-6.4.0RC6/etc/wxpython/gui_modules/wxgui_utils.py",
line 73, in __init__
super(LayerTree, self).__init__(parent, id, pos, size,
style=style, ctstyle=ctstyle)
File "/usr/lib64/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/lib/mixins/treemixin.py",
line 488, in __init__
super(DragAndDrop, self).__init__(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'ctstyle'

wxPython 2.8.11 isn't backwards compatible with 2.8.10. It has been
discussed in slightly more detail here:

http://lists.osgeo.org/pipermail/grass-dev/2010-June/050766.html

Apparently the suggested fix in this email has not made it into SVN.

Would it cure the problem incl. a backport to 6.4?

Markus

Hi,

2010/6/8 Markus Neteler <neteler@osgeo.org>:

[...]

wxPython 2.8.11 isn't backwards compatible with 2.8.10. It has been
discussed in slightly more detail here:

http://lists.osgeo.org/pipermail/grass-dev/2010-June/050766.html

Apparently the suggested fix in this email has not made it into SVN.

Would it cure the problem incl. a backport to 6.4?

done in r42520 (backported to devbr6 in r42521). After some testing
can be backported to relbr64.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

On Tue, Jun 8, 2010 at 7:42 PM, Mathieu Baudier <mbaudier@argeo.org> wrote:

wxPython 2.8.11 isn't backwards compatible with 2.8.10. It has been
discussed in slightly more detail here:

Does this mean that we have to downgrade wxPython somehow, or can we
expect it to be fixed in GRASS 6.4 ?

Mathieu,

Martin has kindly applied the patch and backported it to 6.5, could you
please take the diff and apply it to your copy to see if it works & helps?

http://trac.osgeo.org/grass/changeset/42522?format=diff&new=42522

My wxPython version is older, so that I cannot test it here.

thanks
Markus

Hi,

2010/6/8 Markus Neteler <neteler@osgeo.org>:

Martin has kindly applied the patch and backported it to 6.5, could you
please take the diff and apply it to your copy to see if it works & helps?

http://trac.osgeo.org/grass/changeset/42522?format=diff&new=42522

try

http://trac.osgeo.org/grass/attachment/ticket/1085/ctstyle.diff

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

try

http://trac.osgeo.org/grass/attachment/ticket/1085/ctstyle.diff

Many thanks for the patch!
I could apply it directly on the 6.4RC06 codebase

Name: grass
Version: 6.4.0RC6
...
Patch4: grass-ctstyle.patch
...
%patch4 -p0
...

and the wxUI now starts properly.

However when I now try to add, say, a raster, I get the following
error in the command output:

Traceback (most recent call last):
  File "/usr/lib64/grass-6.4.0RC6/etc/wxpython/wxgui.py",
line 1269, in OnAddRaster

self.AddRaster(event)
  File "/usr/lib64/grass-6.4.0RC6/etc/wxpython/wxgui.py",
line 1394, in AddRaster

self.curr_page.maptree.AddLayer('raster')
  File "/usr/lib64/grass-6.4.0RC6/etc/wxpython/gui_modules/w
xgui_utils.py", line 678, in AddLayer

layer = self.PrependItem(parent=self.root, text='',
ct_type=1, wnd=ctrl)
  File "/usr/lib64/python2.4/site-
packages/wx-2.8-gtk2-unicode/wx/lib/agw/customtreectrl.py",
line 4065, in PrependItem

return self.DoInsertItem(parent, 0, text, ct_type, wnd,
image, selImage, data)
  File "/usr/lib64/python2.4/site-
packages/wx-2.8-gtk2-unicode/wx/lib/agw/customtreectrl.py",
line 3966, in DoInsertItem

raise Exception("\nERROR: In Order To Append/Insert Controls
You Have To Use The Style TR_HAS_VARIABLE_ROW_HEIGHT")
Exception
:
ERROR: In Order To Append/Insert Controls You Have To Use
The Style TR_HAS_VARIABLE_ROW_HEIGHT

Same (or similar) when adding a vector:

Traceback (most recent call last):
  File "/usr/lib64/grass-6.4.0RC6/etc/wxpython/wxgui.py",
line 1326, in OnAddVector

self.AddVector(event)
  File "/usr/lib64/grass-6.4.0RC6/etc/wxpython/wxgui.py",
line 1428, in AddVector

self.curr_page.maptree.AddLayer('vector')
  File "/usr/lib64/grass-6.4.0RC6/etc/wxpython/gui_modules/w
xgui_utils.py", line 678, in AddLayer

layer = self.PrependItem(parent=self.root, text='',
ct_type=1, wnd=ctrl)
  File "/usr/lib64/python2.4/site-
packages/wx-2.8-gtk2-unicode/wx/lib/agw/customtreectrl.py",
line 4065, in PrependItem

return self.DoInsertItem(parent, 0, text, ct_type, wnd,
image, selImage, data)
  File "/usr/lib64/python2.4/site-
packages/wx-2.8-gtk2-unicode/wx/lib/agw/customtreectrl.py",
line 3966, in DoInsertItem

raise Exception("\nERROR: In Order To Append/Insert Controls
You Have To Use The Style TR_HAS_VARIABLE_ROW_HEIGHT")
Exception
:
ERROR: In Order To Append/Insert Controls You Have To Use
The Style TR_HAS_VARIABLE_ROW_HEIGHT

The same operations do work with the -tcltk interface.

I think we are making good progress.
Any idea what could cause this one?

I'll be really happy to have the wxUI interface running on Enterprise Linux 5!

Hi,

2010/6/16 Mathieu Baudier <mbaudier@argeo.org>:

Many thanks for the patch!
I could apply it directly on the 6.4RC06 codebase

there are more fixes in releasebranch_64, try to compile code from SVN [1].

Martin

[1] http://trac.osgeo.org/grass/wiki/DownloadSource#GRASS6.4

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

there are more fixes in releasebranch_64, try to compile code from SVN [1].

Sorry that it took me so long to come back to you.

I tested the revision 43144 of releasebranch_6_4, and the problem is
indeed solved!

The only significant modification I had to do in our spec file was
that a ChangeLog_%{version}.gz file was missing.
I guess that it is only available in releases tarballs but not in SVN, isn't it?

RPMs for i386 and x86_64 containing a build of this revision are
available in the ELGIS Testing repository (elgis-testing):
http://elgis.argeo.org

Thanks a lot for your help!

Hi,

2010/8/16 Mathieu Baudier <mbaudier@argeo.org>:

The only significant modification I had to do in our spec file was
that a ChangeLog_%{version}.gz file was missing.
I guess that it is only available in releases tarballs but not in SVN, isn't it?

yes. Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa