[GRASS-dev] wxpython 3 and errors in grass

At least for me, it is possible to have multiple versions of wx installed. The important thing is which you use when you compile GRASS—determined by the path to wx_config

Michael


C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)
www: http://csdc.asu.edu, http://shesc.asu.edu
http://www.public.asu.edu/~cmbarton

On Oct 30, 2014, at 10:57 AM, <grass-dev-request@lists.osgeo.org> <grass-dev-request@lists.osgeo.org> wrote:

From: Moritz Lennert <mlennert@club.worldonline.be>

Subject: [GRASS-dev] wxpython 3 and errors in grass

Date: October 30, 2014 at 10:57:46 AM MST

To: grass-dev <grass-dev@lists.osgeo.org>

Hi,

I’ve recently started to see errors when trying to run gui tools such as the interactive color definition or when I try to add a legend to the map composer, and the windows do not open. The traceback is below.

I imagine that this is linked to the fact that I have now wx 3 installed next to wx 2. But what is the solution ?

Moritz


Traceback (most recent call last):
File
“/data/home/mlennert/SRC/GRASS/grass64_release/dist.x86_64
-unknown-linux-gnu/etc/wxpython/lmgr/frame.py”, line 1182,
in RulesCmd

ctable = RasterColorTable(self)
File
“/data/home/mlennert/SRC/GRASS/grass64_release/dist.x86_64
-unknown-linux-gnu/etc/wxpython/modules/colorrules.py”, line
752, in init

title = _(‘Create new color table for raster map’),
**kwargs)
File
“/data/home/mlennert/SRC/GRASS/grass64_release/dist.x86_64
-unknown-linux-gnu/etc/wxpython/modules/colorrules.py”, line
334, in init

self._doLayout()
File
“/data/home/mlennert/SRC/GRASS/grass64_release/dist.x86_64
-unknown-linux-gnu/etc/wxpython/modules/colorrules.py”, line
780, in _doLayout

bodySizer = self._createBody(parent = self.panel)
File
“/data/home/mlennert/SRC/GRASS/grass64_release/dist.x86_64
-unknown-linux-gnu/etc/wxpython/modules/colorrules.py”, line
469, in _createBody

bodySizer.AddGrowableCol(2)
File “/usr/lib/python2.7/dist-
packages/wx-3.0-gtk2/wx/_core.py”, line 15364, in
AddGrowableCol

return core.FlexGridSizer_AddGrowableCol(*args, **kwargs)
wx._core
.
PyAssertionError
:
C++ assertion “!m_cols || idx < (size_t)m_cols” failed at
…/src/common/sizer.cpp(1980) in AddGrowableCol(): invalid
column index


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Michael Barton wrote:

At least for me, it is possible to have multiple versions of wx
installed. The important thing is which you use when you compile
GRASS�determined by the path to wx_config

The only module which is affected by wx-config is
visualisation/wximgview (which has probably been superseded by
scripts/wxpyimgview).

Anything written in Python will use the wxPython version found by the
Python import mechanism and the wxversion module.

If the code doesn't use wxversion, it will use whichever version
site-packages/wx.pth refers to.

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

Maybe William has this built into his bundling code. When I compile and then create a Mac binary, I specify which wx I am using by pointing to a specific wx_config. We then bundle all wxPython code into the binary *.app and GRASS uses that, whatever wx is on the user’s system. Perhaps you can’t do something similar in Linux.

Michael
______________________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)
www: http://csdc.asu.edu, http://shesc.asu.edu
    http://www.public.asu.edu/~cmbarton

On Oct 30, 2014, at 3:14 PM, Glynn Clements <glynn@gclements.plus.com> wrote:

Michael Barton wrote:

At least for me, it is possible to have multiple versions of wx
installed. The important thing is which you use when you compile
GRASS�determined by the path to wx_config

The only module which is affected by wx-config is
visualisation/wximgview (which has probably been superseded by
scripts/wxpyimgview).

Anything written in Python will use the wxPython version found by the
Python import mechanism and the wxversion module.

If the code doesn't use wxversion, it will use whichever version
site-packages/wx.pth refers to.

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

There is a GRASS_WXBUNDLED var (set in the OS X grass.sh) that globalvar.py checks for, to avoid the CheckForWx() call, and it's wxversion stuff. I think the problem was that the bundled wxpython would be ignored, even though it was before another installed wxpython in the search path, something to do with the wxversion mechanism for selecting a version.

On Oct 30, 2014, at 5:20 PM, Michael Barton <michael.barton@asu.edu> wrote:

Maybe William has this built into his bundling code. When I compile and then create a Mac binary, I specify which wx I am using by pointing to a specific wx_config. We then bundle all wxPython code into the binary *.app and GRASS uses that, whatever wx is on the user’s system. Perhaps you can’t do something similar in Linux.

Michael
______________________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671(SHESC), 480-727-0709 (CSDC)
www: http://csdc.asu.edu, http://shesc.asu.edu
    http://www.public.asu.edu/~cmbarton

On Oct 30, 2014, at 3:14 PM, Glynn Clements <glynn@gclements.plus.com> wrote:

Michael Barton wrote:

At least for me, it is possible to have multiple versions of wx
installed. The important thing is which you use when you compile
GRASS�determined by the path to wx_config

The only module which is affected by wx-config is
visualisation/wximgview (which has probably been superseded by
scripts/wxpyimgview).

Anything written in Python will use the wxPython version found by the
Python import mechanism and the wxversion module.

If the code doesn't use wxversion, it will use whichever version
site-packages/wx.pth refers to.

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

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"This is a question about the past, is it? ... How can I tell that the past isn't a fiction designed to account for the discrepancy between my immediate physical sensations and my state of mind?"

- The Ruler of the Universe