3.0.3 ?

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

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 Additional Refactoring of lib.plot [Part 3: other changes] by dougthor42 · Pull Request #117 · wxWidgets/Phoenix · GitHub

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

···

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

Hi,

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
Additional Refactoring of lib.plot [Part 3: other changes] by dougthor42 · Pull Request #117 · wxWidgets/Phoenix · GitHub

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 :frowning:

Martin

···

2016-07-14 20:26 GMT+02:00 Dietmar Schwertberger <maillist@schwertberger.de>:

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

Hi,

Hi,

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
Additional Refactoring of lib.plot [Part 3: other changes] by dougthor42 · Pull Request #117 · wxWidgets/Phoenix · GitHub

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 :frowning:

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.

···

On Thu, Jul 14, 2016 at 2:49 PM, Martin Landa <landa.martin@gmail.com> wrote:

2016-07-14 20:26 GMT+02:00 Dietmar Schwertberger <maillist@schwertberger.de>:

Martin

--
Martin Landa
Ing. Martin Landa, Ph.D. – GeoWikiCZ
Martin Landa - GISMentors

--
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-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

···

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 :frowning:

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

···

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.

Hi,

···

2016-07-14 21:47 GMT+02:00 Dietmar Schwertberger <maillist@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 :wink: Thanks, Martin

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

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 (95.2 KB)

···

On Thursday, July 14, 2016 at 11:28:20 AM UTC+2, Martin Landa wrote:

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

  1. 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

Hi,

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

···

2016-07-14 21:47 GMT+02:00 Dietmar Schwertberger <maillist@schwertberger.de>:

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

Apologies for jumping in late.

If the main issue is the use of wx.lib.plot, you might find wxmplot (
GitHub - newville/wxmplot: wxPython plotting widgets using matplotlib) 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

···

On Fri, Jul 15, 2016 at 1:37 PM, Martin Landa <landa.martin@gmail.com> wrote:

Hi,

2016-07-14 21:47 GMT+02:00 Dietmar Schwertberger <
maillist@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

Hi Martin!

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.

···

On 15.07.2016 20:37, Martin Landa wrote:

Hi,

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] GRASS GIS Quickstart - GRASS GIS Manual
[2] https://grass.osgeo.org/sampledata/north_carolina/nc_basic_spm_grass7.zip

···

2016-07-15 22:34 GMT+02:00 Dietmar Schwertberger <maillist@schwertberger.de>:

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

I tried just the default settings "demolocation" and "PERMANENT".

Regards,

Dietmar

···

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?

Robin has just added PseudoDC to Phoenix.
So it should be in the next snapshots.

Regards,

Dietmar

···

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

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.

Anna

···

On Sat, Jul 30, 2016 at 5:06 AM, Dietmar Schwertberger <maillist@schwertberger.de> wrote:

On 14.07.2016 20:49, Martin Landa wrote:

Regards,

Dietmar

--
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-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi, Anna,

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.

···

On Wed, Aug 3, 2016 at 7:13 AM, Anna Petrášová <kratochanna@gmail.com> wrote:

On Sat, Jul 30, 2016 at 5:06 AM, Dietmar Schwertberger > <maillist@schwertberger.de> wrote:

On 14.07.2016 20:49, Martin Landa wrote:

Anna

Regards,

Dietmar

--
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-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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