3.0.3 ?

240 views
Skip to first unread message

Martin Landa

unread,
Jul 14, 2016, 5:28:20 AM7/14/16
to wxpython-user, GRASS developers list
Dear all,

in GRASS project [1] we are facing to a serious problem with wxPython
due to well known bug [2]. Several our tools are not functional at all
due to this bug. The last version 3.0.2 has been released in November
2014. This bug seems to be fixed 6 months ago [2]. Is there any chance
that wxPython community will be able to release 3.0.3 this year? It
would help us a LOT! Thanks for your work! Martin

[1] http://grass.osgeo.org/
[2] http://trac.wxwidgets.org/ticket/16767

--
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa

Dietmar Schwertberger

unread,
Jul 14, 2016, 2:27:10 PM7/14/16
to wxpytho...@googlegroups.com
On 14.07.2016 11:28, Martin Landa wrote:
> 2014. This bug seems to be fixed 6 months ago [2]. Is there any chance
> that wxPython community will be able to release 3.0.3 this year? It
> would help us a LOT! Thanks for your work! Martin
From a quick look, it's plot related.

Is Phoenix an option for you?
Douglas is currently doing a lot of work on lib.plot for Phoenix.
Maybe you should test the latest snapshot whether the fix is in already.
If not, please comment on the pull request at
https://github.com/wxWidgets/Phoenix/pull/117

Or is Phoenix not an option?
Then it might be the best to take the classic version, apply the patch
and build it yourself.
I'm not aware of plans for a new build.

Myself, I switched to Phoenix last year and was positively suprised
about stability and completeness. Now the situation is even better.

Regards,

Dietmar

Martin Landa

unread,
Jul 14, 2016, 2:49:16 PM7/14/16
to wxpython-user, GRASS developers list
Hi,

2016-07-14 20:26 GMT+02:00 Dietmar Schwertberger <mail...@schwertberger.de>:
> Is Phoenix an option for you?
> Douglas is currently doing a lot of work on lib.plot for Phoenix.
> Maybe you should test the latest snapshot whether the fix is in already. If
> not, please comment on the pull request at
> https://github.com/wxWidgets/Phoenix/pull/117

may be, I was speaking with one colleague of mine, she mentioned that
Phoenix probably lacks PseudoDC. This would be absolute blocker for
us. We use PseudoDC for rendering data. There is also question how
much time it can take to get Phoenix into distributions like Debian. I
would vote for releasing classic as it is now as 3.0.3 at least.

> Or is Phoenix not an option?
> Then it might be the best to take the classic version, apply the patch and
> build it yourself.

Hm, we are trying to support wide range of platforms. It's impossible
for us to build every dependency on our own, sorry. We must relay on
official packages.

> I'm not aware of plans for a new build.

That's VERY VERY bad news for us :-(

Martin

Igor Korot

unread,
Jul 14, 2016, 3:15:09 PM7/14/16
to wxpytho...@googlegroups.com, GRASS developers list
Hi,
There was recently a thread about new wxPython/Phoenix release.
Just search thru the archive.

Also I believe the classic 3.0.3 might happen at the same time.

Thank you.
> --
> You received this message because you are subscribed to the Google Groups "wxPython-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-user...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Scott Talbert

unread,
Jul 14, 2016, 3:17:14 PM7/14/16
to wxpython-user, GRASS developers list
On Thu, 14 Jul 2016, Martin Landa wrote:

> Hm, we are trying to support wide range of platforms. It's impossible
> for us to build every dependency on our own, sorry. We must relay on
> official packages.
>
>> I'm not aware of plans for a new build.
>
> That's VERY VERY bad news for us :-(

Yeah, Robin seems heavily focused on Phoenix and not at all on Classic.

We could, however, probably get the plot patch into the Debian package.
It's been in Fedora for a while.

Scott

Dietmar Schwertberger

unread,
Jul 14, 2016, 3:47:27 PM7/14/16
to wxpytho...@googlegroups.com
On 14.07.2016 20:49, Martin Landa wrote:
> may be, I was speaking with one colleague of mine, she mentioned that
> Phoenix probably lacks PseudoDC. This would be absolute blocker for
> us. We use PseudoDC for rendering data. There is also question how
> much time it can take to get Phoenix into distributions like Debian. I
> would vote for releasing classic as it is now as 3.0.3 at least.
As your problems are only with wx.lib.plot.py, i.e. pure Python without
modifications to C++ sources, why not include a patched version in your
software?
I don't think that there are licensing problems.
You may import your version right at the start of your software.
Then do something like

sys.modules["wx.lib.plot"] = sys.modules["patched_plot"]


I've not done this before. It might not be as straightforward as
outlined here, but I'm quite sure that a quick search or a post on
comp.lang.python will solve your problem.


Regards,

Dietmar

Martin Landa

unread,
Jul 14, 2016, 3:58:46 PM7/14/16
to wxpython-user, GRASS developers list
Hi,

2016-07-14 21:47 GMT+02:00 Dietmar Schwertberger <mail...@schwertberger.de>:
> I don't think that there are licensing problems.
> You may import your version right at the start of your software.
> Then do something like
>
> sys.modules["wx.lib.plot"] = sys.modules["patched_plot"]

yes, sure, we will do. But it's non-systematic way. Better would be
new wxPython release ;-) Thanks, Martin

Marco Prosperi

unread,
Jul 14, 2016, 5:46:52 PM7/14/16
to wxPython-users, gras...@lists.osgeo.org


attached you can find the plot.py file I use with 3.0.2 Classic in production. It fixes the problems of the original plot.py for me, following old posts and hints on this mailing list about this subject

PseudoDC is blocking me too from using Phoenix so I decided to participate to the bounty to push the envelope

https://groups.google.com/forum/#!topic/wxpython-users/-ey4AysT9ao
plot.py

Martin Landa

unread,
Jul 15, 2016, 2:38:00 PM7/15/16
to wxpython-user
Hi,

2016-07-14 21:47 GMT+02:00 Dietmar Schwertberger <mail...@schwertberger.de>:
> sys.modules["wx.lib.plot"] = sys.modules["patched_plot"]

I tried to replace the module in such way. Then working with PlotCanvas fails:

self.client = PlotCanvas(self) # self is wx.Frame

->

self.client.canvas.Bind(wx.EVT_LEFT_DOWN, self.OnMouseLeftDown)
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py",
line 4228, in Bind
event.Bind(self, id, id2, handler)
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py",
line 4572, in Bind
target.Connect(id1, id2, et, function)
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py",
line 4182, in Connect
return _core_.EvtHandler_Connect(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "m_window" failed at
../src/gtk/dcclient.cpp(2043) in DoGetSize(): GetSize() doesn't work
without window

Any idea what could be wrong? Thanks, Martin

Matt Newville

unread,
Jul 15, 2016, 3:17:44 PM7/15/16
to wxpytho...@googlegroups.com
Apologies for jumping in late.

If the main issue is the use of wx.lib.plot, you might find wxmplot (https://github.com/newville/wxmplot) useful.  It may not be a one-to-one replacement for wx.lib.plot, but has a similar high-leve approach of making a wxPanel that contains a plot, and adds a simple "plot(x, y)" method to that.  It handles mouse events, including rubber-band zoom, and copy-to-clipboard and printing.  It also has several useful features not found in wx.lib.plot, including allowing the end user to change line colors, widths, etc from a GUI frame after the plot has been drawn.  

It does use matplotlib as the drawing backend which adds a dependency but also provides many excellent features, including latex syntax for labels.  Wxmplot has some documentation and examples, though I'm sure both of these could be improved.  To be clear, wxmplot does work with Phoenix and with Python 2.7 and 3.5.

Cheers,

--Matt Newville

Dietmar Schwertberger

unread,
Jul 15, 2016, 4:35:07 PM7/15/16
to wxpytho...@googlegroups.com
Hi Martin!


On 15.07.2016 20:37, Martin Landa wrote:
> Any idea what could be wrong? Thanks, Martin

I tried to reproduce this, but I can't start GRASS at all.

I've downloaded GRASS 7.0.4 (the win32 version, but running on Windows
7, 64 bit).
On running the .bat file and clicking on "Starte GRASS Sitzung", I get
an exception already. See below for the backtrace.

Am I missing something?


Regards,

Dietmar


Launching <wxpython> GUI in the background, please wait...
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.

C:\Users\dietmar>Traceback (most recent call last):
File "C:\Program Files (x86)\GRASS GIS 7.0.4\gui\wxpython\wxgui.py",
line 148, in <module>
sys.exit(main())
File "C:\Program Files (x86)\GRASS GIS 7.0.4\gui\wxpython\wxgui.py",
line 135, in main
app = GMApp(workspaceFile)
File "C:\Program Files (x86)\GRASS GIS 7.0.4\gui\wxpython\wxgui.py",
line 50, in __init__
wx.App.__init__(self, False)
File "C:\Program Files (x86)\GRASS GIS
7.0.4\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line
7981, in
__init__
self._BootstrapApp()
File "C:\Program Files (x86)\GRASS GIS
7.0.4\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line
7555, in
_BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "C:\Program Files (x86)\GRASS GIS 7.0.4\gui\wxpython\wxgui.py",
line 84, in OnInit
workspace=self.workspaceFile)
File "C:\Program Files (x86)\GRASS GIS
7.0.4\gui\wxpython\lmgr\frame.py", line 134, in __init__
self.notebook = self._createNoteBook()
File "C:\Program Files (x86)\GRASS GIS
7.0.4\gui\wxpython\lmgr\frame.py", line 303, in _createNoteBook
gcstyle = GC_PROMPT)
File "C:\Program Files (x86)\GRASS GIS
7.0.4\gui\wxpython\gui_core\goutput.py", line 104, in __init__
self.cmdPrompt = GPromptSTC(parent=self, menuModel=self._menuModel)
File "C:\Program Files (x86)\GRASS GIS
7.0.4\gui\wxpython\gui_core\prompt.py", line 137, in __init__
GPrompt.__init__(self, parent = parent, menuModel = menuModel)
File "C:\Program Files (x86)\GRASS GIS
7.0.4\gui\wxpython\gui_core\prompt.py", line 56, in __init__
self.mapList = self._getListOfMaps()
File "C:\Program Files (x86)\GRASS GIS
7.0.4\gui\wxpython\gui_core\prompt.py", line 96, in _getListOfMaps
result['raster'] = grass.list_strings('raster')
File "C:\Program Files (x86)\GRASS GIS
7.0.4\etc\python\grass\script\core.py", line 1143, in list_strings
mapset=mapset).splitlines():
File "C:\Program Files (x86)\GRASS GIS
7.0.4\etc\python\grass\script\core.py", line 446, in read_command
return handle_errors(returncode, stdout, args, kwargs)
File "C:\Program Files (x86)\GRASS GIS
7.0.4\etc\python\grass\script\core.py", line 313, in handle_errors
returncode=returncode)
grass.exceptions.CalledModuleError: Module run None ['g.list', '--q',
'-m', 'type=raster'] ended with error
Process ended with non-zero return code -1073741512. See errors in the
(error) output.

Martin Landa

unread,
Jul 16, 2016, 12:16:00 PM7/16/16
to wxpython-user
Hi,

2016-07-15 22:34 GMT+02:00 Dietmar Schwertberger <mail...@schwertberger.de>:
> I tried to reproduce this, but I can't start GRASS at all.
>
> I've downloaded GRASS 7.0.4 (the win32 version, but running on Windows 7, 64
> bit).
> On running the .bat file and clicking on "Starte GRASS Sitzung", I get an
> exception already. See below for the backtrace.

GRASS uses strict data structure. To start GRASS you need to define
GIS data directory (1), Location (2) and Mapset (3) [1]. You can
create empty location (New button) or use sample data [2]. How looks
your Location?

Thanks for testing, Martin

[1] https://grass.osgeo.org/grass70/manuals/helptext.html
[2] https://grass.osgeo.org/sampledata/north_carolina/nc_basic_spm_grass7.zip

Dietmar Schwertberger

unread,
Jul 17, 2016, 10:59:13 AM7/17/16
to wxpytho...@googlegroups.com
On 16.07.2016 18:15, Martin Landa wrote:
> GRASS uses strict data structure. To start GRASS you need to define
> GIS data directory (1), Location (2) and Mapset (3) [1]. You can
> create empty location (New button) or use sample data [2]. How looks
> your Location?
I tried just the default settings "demolocation" and "PERMANENT".

Regards,

Dietmar


Dietmar Schwertberger

unread,
Jul 30, 2016, 5:06:22 AM7/30/16
to wxpytho...@googlegroups.com
On 14.07.2016 20:49, Martin Landa wrote:
> may be, I was speaking with one colleague of mine, she mentioned that
> Phoenix probably lacks PseudoDC. This would be absolute blocker for
Robin has just added PseudoDC to Phoenix.
So it should be in the next snapshots.

Regards,

Dietmar

Anna Petrášová

unread,
Aug 3, 2016, 7:13:47 AM8/3/16
to wxpytho...@googlegroups.com
Awesome! We'll start testing it. Thanks for notifying us here.

Anna

>
> Regards,
>
> Dietmar

Igor Korot

unread,
Aug 3, 2016, 9:30:30 AM8/3/16
to wxpytho...@googlegroups.com
Hi, Anna,

On Wed, Aug 3, 2016 at 7:13 AM, Anna Petrášová <krato...@gmail.com> wrote:
> On Sat, Jul 30, 2016 at 5:06 AM, Dietmar Schwertberger
> <mail...@schwertberger.de> wrote:
>> On 14.07.2016 20:49, Martin Landa wrote:
>>>
>>> may be, I was speaking with one colleague of mine, she mentioned that
>>> Phoenix probably lacks PseudoDC. This would be absolute blocker for
>>
>> Robin has just added PseudoDC to Phoenix.
>> So it should be in the next snapshots.
>
>
> Awesome! We'll start testing it. Thanks for notifying us here.

You can see what changes by signing up to either IRC channel at #wxwidgets
or to the appropriate ML.

Thank you.

Udi Fuchs

unread,
Oct 23, 2016, 3:56:55 AM10/23/16
to wxPython-users
I had a similar issue of wx.lib.plot crushing with GetSize errors.

The following small patch solved my problem:

--- /usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/lib/plot.py.original    2016-10-22 23:19:02.799210545 -0500
+++ /usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/lib/plot.py    2016-10-22 23:19:19.507436042 -0500
@@ -667,7 +667,7 @@
         # OnSize called to make sure the buffer is initialized.
         # This might result in OnSize getting called twice on some
         # platforms at initialization, but little harm done.
-        self.OnSize(None)  # sets the initial size based on client size
+        #self.OnSize(None)  # sets the initial size based on client size
 
         self._gridColour = wx.BLACK

I only tested the patch on Linux. From the comment is seems that other platforms might behave differently.

Udi

Reply all
Reply to author
Forward
0 new messages