#2558 closed defect (fixed)
wxgui: profile surface map, bivariate scatter plot, histogram of raster map broken with wxPython 3.0.2 but work fine fine with 2.8
Reported by: | humu2015 | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 6.4.6 |
Component: | wxGUI | Version: | 6.4.5 |
Keywords: | wxgui | Cc: | msieczka |
CPU: | All | Platform: | All |
Description (last modified by )
The command console gives this output:
Traceback (most recent call last): File "/opt/grass64/etc/wxpython/mapdisp/frame.py", line 1026, in OnProfile win = ProfileFrame(parent = self, rasterList = raster) File "/opt/grass64/etc/wxpython/wxplot/profile.py", line 48, in __init__ BasePlotFrame.__init__(self, parent, size = size, **kwargs) File "/opt/grass64/etc/wxpython/wxplot/base.py", line 85, in __init__ self.client = plot.PlotCanvas(self) File "/usr/lib64/python2.7/site- packages/wx-3.0-gtk2/wx/lib/plot.py", line 598, in __init__ self.HandCursor = wx.Cursor(Hand.GetImage()) File "/usr/lib64/python2.7/site- 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''''
Change History (23)
comment:1 by , 10 years ago
Component: | Default → wxGUI |
---|---|
Description: | modified (diff) |
follow-up: 5 comment:2 by , 10 years ago
comment:4 by , 9 years ago
Milestone: | → 6.4.6 |
---|
comment:5 by , 9 years ago
Replying to annakrat:
I am not sure if we can do anything about this: http://trac.wxwidgets.org/ticket/16767
This is still and issue (including on grass7). The wx issues seem to have been fixed [1], but in until these are released in a new version 3.0.3 the histogram tool is completely unusable ! Is there really no temporary workaround ?
[1] https://github.com/wxWidgets/wxPython/commits/master/wx/lib/plot.py
follow-up: 7 comment:6 by , 9 years ago
This is really getting to be very frustrating: I cannot use any of the gui tools with my students (g.gui.iclass, histogram, profile) because of this bug.
I tried to locally patch my wxpython install with the modifications in the above link, but this leads to other errors.
Is there really no other solution than to wait for the next release ? This makes many very nice GUI features completely unusable.
follow-up: 8 comment:7 by , 9 years ago
Replying to mlennert:
Is there really no other solution than to wait for the next release ? This makes many very nice GUI features completely unusable.
The only solution I can see (beside rewriting it using matplotlib) is to copy and integrate the particular code with the fix in GRASS. Licence should be OK I hope. I can try to do that, but I fear I run into problems with different versions of wxPython on different computers. Do we know for which versions the code has this bug?
comment:8 by , 9 years ago
Replying to annakrat:
Replying to mlennert:
Is there really no other solution than to wait for the next release ? This makes many very nice GUI features completely unusable.
The only solution I can see (beside rewriting it using matplotlib) is to copy and integrate the particular code with the fix in GRASS. Licence should be OK I hope. I can try to do that, but I fear I run into problems with different versions of wxPython on different computers. Do we know for which versions the code has this bug?
AFAICT, it's only wxpython 3.0.2. The commit that the above patch corrects dates from Oct. 2014 [1], i.e. between the releases of 3.0.1.1 and 3.0.2 [2].
I actually tried to apply the proposed patch locally to my wxpython installation. I didn't get the same error messages in GRASS anymore, but others. But I currently have no time to investigate this any further. Sorry...
[1] http://trac.wxwidgets.org/changeset/77995/svn-wx [2] http://www.wxpython.org/
comment:9 by , 9 years ago
Here is a recent stack exchange for this problem. Supposedly it is fixed in wxPython 3.0.3.
http://stackoverflow.com/questions/30383786/wxpython-wx-lib-plot-plotcanvas-error
comment:10 by , 8 years ago
Cc: | added |
---|---|
CPU: | Unspecified → All |
Keywords: | wxgui added |
Platform: | Linux → All |
Priority: | critical → major |
Summary: | The 'Profile Surfae Map' tool does not function. → wxgui: profile surface map, bivariate scatter plot, histogram of raster map broken with wxPython 3.0.2 but work fine fine with 2.8 |
Version: | unspecified → 7.0.4 |
No such error when wxgui uses wxPython 2.8 instead of 3.0.2. If you can't install 2.8 without 3.0.2 (like on Arch Linux, where 2.8 package requires 3.0.2 package), add
wxversion.select('2.8')
in line 64 of gui/wxpython/core/globalvar.py to force wxgui to pick version 2.8. Otherwise it defaults to 3.0.2 when both wxPython versions are available.
Any objections to submitting this patch to SVN?
The issue applies to both 7.x and 6.x. The "Create bivariate scatter plot of raster maps" and "Create histogram of raster map" tools are affected as well, and the wxversion.select('2.8')
fixes them too.
follow-up: 12 comment:11 by , 8 years ago
I don't think selecting 2.8 is a good solution. I suggest copying the plot.py file from wx and distribute it with GRASS gui.
follow-up: 15 comment:12 by , 8 years ago
Replying to annakrat:
I don't think selecting 2.8 is a good solution.
Can you explain why you think so?
I suggest copying the plot.py file from wx and distribute it with GRASS gui.
How exactly? Which particular https://github.com/wxWidgets/wxPython/commits/master/wx/lib/plot.py version would you use?
mlennert complained about some other errors taking place when he tried it. I wish we knew what he did and what were those errors.
follow-up: 14 comment:13 by , 8 years ago
One reason to keep available the possibility of using wxPython 3.0.2 (or Phoenix when it is developed to a place where it is useable), is that 2.8 is 32 bit only on the Mac. Maybe on other platforms too.
However, most other parts of GRASS and its dependencies have migrated to 64 bit architecture. This is causing all kinds of difficulties in compiling because it has to be done dual architecture (32/64 bit) and some programs do not support this or don't support it well.
I'm trying to find out where the problems in wxPython 3 are so that they can be fixed. The plot.py problem was the worst but is easily patched.
comment:14 by , 8 years ago
Replying to cmbarton:
One reason to keep available the possibility of using wxPython 3.0.2 (or Phoenix when it is developed to a place where it is useable), is that 2.8 is 32 bit only on the Mac.
Thanks for explaining this. What would it take to have wxPython 2.8 64bit for Mac GRASS build?
Maybe on other platforms too.
I don't know about any such either.
I'm trying to find out where the problems in wxPython 3 are so that they can be fixed. The plot.py problem was the worst but is easily patched.
Good luck!
comment:15 by , 8 years ago
Replying to msieczka:
Replying to annakrat:
I don't think selecting 2.8 is a good solution.
Can you explain why you think so?
I suggest copying the plot.py file from wx and distribute it with GRASS gui.
How exactly? Which particular https://github.com/wxWidgets/wxPython/commits/master/wx/lib/plot.py version would you use?
mlennert complained about some other errors taking place when he tried it. I wish we knew what he did and what were those errors.
I locally applied the patch at [1], but as I said this led to other errors and I did not have time to pursue. And, no, I didn't record the other errors, just gave up...
comment:16 by , 8 years ago
follow-up: 18 comment:17 by , 8 years ago
Milestone: | 6.4.6 → 7.0.5 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed in r69075 (and backported in r69076 and r69077). wxPython file wx.lib.plot.py (the fixed version, see http://trac.wxwidgets.org/ticket/16767) is now distributed with GRASS and modified to workaround this bug specific for wxGTK only: http://trac.wxwidgets.org/ticket/17293
follow-up: 19 comment:18 by , 8 years ago
Milestone: | 7.0.5 → 6.4.6 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Version: | 7.0.4 → 6.4.5 |
follow-up: 20 comment:19 by , 8 years ago
Replying to msieczka:
Replying to annakrat:
Great. But releasebranch_6_4 is still affected. Re-opening.
AFAIK, only profile is concerned by this in grass64.
Applying the relevant patches to gui/wxpython/wxplot/base.py and gui/wxpython/wxplot/profile.py
makes it work for me.
Anna, AFAICT this should be safe, but what do you think ?
follow-up: 22 comment:20 by , 8 years ago
Replying to mlennert:
AFAIK, only profile is concerned by this in grass64.
Applying the relevant patches to gui/wxpython/wxplot/base.py and gui/wxpython/wxplot/profile.py
makes it work for me.
Anna, AFAICT this should be safe, but what do you think ?
I think so. Please go ahead and commit it.
follow-up: 23 comment:22 by , 8 years ago
Replying to annakrat:
Replying to mlennert:
AFAIK, only profile is concerned by this in grass64.
Applying the relevant patches to gui/wxpython/wxplot/base.py and gui/wxpython/wxplot/profile.py
makes it work for me.
Anna, AFAICT this should be safe, but what do you think ?
I think so. Please go ahead and commit it.
Done.
Maciej, could you test ?
I am not sure if we can do anything about this: http://trac.wxwidgets.org/ticket/16767