[GRASS-dev] [GRASS-user] Grass profile problem in Ubuntu 16.04 LTS 64 bit

Maciej Sieczka msieczka at sieczka.org
Tue Jul 5 01:23:16 PDT 2016


W dniu 05.07.2016 o 04:43, Do Thi Hang pisze:
 > Please find below the error I get when I try to use profile ....
 >
 >
 > Traceback (most recent call last):
 >   File "/usr/lib/grass70/gui/wxpython/mapdisp/frame.py",
 > line 1043, in OnProfile
 >
 > self.Profile(rasters=rasters)
 >   File "/usr/lib/grass70/gui/wxpython/mapdisp/frame.py",
 > line 1051, in Profile
 >
 > controller=self.profileController)
 >   File "/usr/lib/grass70/gui/wxpython/wxplot/profile.py",
 > line 52, in __init__
 >
 > BasePlotFrame.__init__(self, parent=parent, size=size,
 > **kwargs)
 >   File "/usr/lib/grass70/gui/wxpython/wxplot/base.py", line
 > 88, in __init__
 >
 > self.client = plot.PlotCanvas(self)
 >   File "/usr/lib/python2.7/dist-
 > packages/wx-3.0-gtk2/wx/lib/plot.py", line 598, in __init__
 >
 > self.HandCursor = wx.Cursor(Hand.GetImage())
 >   File "/usr/lib/python2.7/dist-
 > packages/wx-3.0-gtk2/wx/_gdi.py", line 1510, in __init__
 >
 > _gdi_.Cursor_swiginit(self,_gdi_.new_Cursor(*args,
 > **kwargs))
 > TypeError
 > :
 > Required argument 'type' (pos 2) not found

Same problem on Arch Linux where wxPython 2.8 package requires wxPython
3 package. Thus one can't have wxPython 2.8 installed alone, while GRASS
wxgui defaults to wxPython 3 in case both 3 and 2.8 are installed.

Several months ago Glynn wrote
(https://lists.osgeo.org/pipermail/grass-dev/2014-October/071122.html):

 > In theory, code which uses the wxPython library is supposed to use
 > something like:
 >
 > 	import wxversion
 > 	wxversion.select('2.8')
 > 	import wx

Question to GRASS team: would there be any problem with adding the above
wxversion selector to all wxgui code that is not comaptible with
wxPython 3? Further in the thread Glynn suggested:

 > One option would be to replace "import wx" with "import grass.wx",
 > where the grass.wx module is just
 >
 > 	wxversion.select('2.8')
 > 	from wx import *
 >
 > The other option is to only add wxversion.select() to top-level
 > modules, i.e. those which are executed as scripts rather than imported
 > as modules.

Maciek

-- 
Maciej Sieczka
http://www.sieczka.org



More information about the grass-dev mailing list