new_user matplotlib help

Sorry to bother everyone with this post.

I am new to matplotlib and python in general and am finding a problem that I don’t understand.

I’ve downloaded the scipy superpack (through easy_install) from C. Fonnesbeck (http://trichech.us) and receive and error when plotting (example below).

Personally I do not know enough to diagnose it nor fix the problem. what is _wx.py relate to? How am I getting C++ assertion failures, shouldn’t this go through gcc?

Thanks for the help. Jon

system: mac os 10.5, python 2.5.1

Problem:

from pylab import *

plot([1,2,3,4])
[<matplotlib.lines.Line2D object at 0x6ae9a90>]

show()
Traceback (most recent call last):
File “/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py”, line 1019, in _onPaint
self.gui_repaint(drawDC=wx.PaintDC(self))
File “/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py”, line 924, in gui_repaint
wx.GetApp().Yield()
File “/BinaryCache/wxWidgets/wxWidgets-11~57/Root/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wx-2.8-mac-unicode/wx/_core.py”, line 7119, in Yield
wx._core.PyAssertionError: C++ assertion “wxAssertFailure” failed at …/src/mac/carbon/app.cpp(1152) in Yield(): wxYield called recursively
Traceback (most recent call last):
File “/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py”, line 1019, in _onPaint
self.gui_repaint(drawDC=wx.PaintDC(self))
File “/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py”, line 924, in gui_repaint
wx.GetApp().Yield()
File “/BinaryCache/wxWidgets/wxWidgets-11~57/Root/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wx-2.8-mac-unicode/wx/_core.py”, line 7119, in Yield
wx._core.PyAssertionError: C++ assertion “wxAssertFailure” failed at …/src/mac/carbon/app.cpp(1152) in Yield(): wxYield called recursively
Traceback (most recent call last):
File “/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py”, line 1019, in _onPaint
self.gui_repaint(drawDC=wx.PaintDC(self))
File “/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py”, line 924, in gui_repaint
wx.GetApp().Yield()
File “/BinaryCache/wxWidgets/wxWidgets-11~57/Root/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wx-2.8-mac-unicode/wx/_core.py”, line 7119, in Yield
wx._core.PyAssertionError: C++ assertion “wxAssertFailure” failed at …/src/mac/carbon/app.cpp(1152) in Yield(): wxYield called recursively
Traceback (most recent call last):
File “/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py”, line 1019, in _onPaint
self.gui_repaint(drawDC=wx.PaintDC(self))
File “/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py”, line 924, in gui_repaint
wx.GetApp().Yield()
File “/BinaryCache/wxWidgets/wxWidgets-11~57/Root/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wx-2.8-mac-unicode/wx/_core.py”, line 7119, in Yield
wx._core.PyAssertionError: C++ assertion “wxAssertFailure” failed at …/src/mac/carbon/app.cpp(1152) in Yield(): wxYield called recursively
Traceback (most recent call last):
File “/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py”, line 1019, in _onPaint
self.gui_repaint(drawDC=wx.PaintDC(self))
File “/Library/Python/2.5/site-packages/matplotlib-0.98pre-py2.5-macosx-10.5-i386.egg/matplotlib/backends/backend_wx.py”, line 924, in gui_repaint
wx.GetApp().Yield()
File “/BinaryCache/wxWidgets/wxWidgets-11~57/Root/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wx-2.8-mac-unicode/wx/_core.py”, line 7119, in Yield
wx._core.PyAssertionError: C++ assertion “wxAssertFailure” failed at …/src/mac/carbon/app.cpp(1152) in Yield(): wxYield called recursively

Hallo new user,

Furthermore, imagine that a large amount of data is being received over a
slow connection. Socket 1
has no data in the read buffer, so it calls wxYield. There is still a
pending event
on Socket 2, so wxWidgets attempts to process that event. However, that
event
cannot complete, and it also calls wxYield. This will cause the infamous
“wxYield called recursively” message to appear. Eventually the stack would
fill
up with recursive calls to wxYield as long as all the data has not yet
arrived
and the call stack cannot unwind. Many users immediately assume that this
error message indicates a flaw in wxWidgets, when the truth is that it
represents
a problem in the application code. Simply stated, applications should be
programmed so that this situation does not occur; the error is present to
reveal a problem in the application code so that it can be fixed.

Please complete one event completely before calling the other event

···

--
View this message in context: http://www.nabble.com/new_user-matplotlib-help-tp15373200p19665311.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Sorry to bother everyone with this post.

I am new to matplotlib and python in general and am finding a problem that I
don't understand.

I've downloaded the scipy superpack (through easy_install) from C.
Fonnesbeck (http://trichech.us) and receive and error when plotting (example
below).

Personally I do not know enough to diagnose it nor fix the problem. what is
_wx.py relate to? How am I getting C++ assertion failures, shouldn't this
go through gcc?

GUI packages like wx cannot be run from the standard python shell, as
you are trying to do in using the ex backend of matplotlib, because of
threading issues. See

  http://matplotlib.sourceforge.net/interactive.html
  http://matplotlib.sourceforge.net/faq.html#SHOW
  http://matplotlib.sourceforge.net/doc/html/faq/installing_faq.html#id1

Short answer: when working interactively from the python shell, either
use tkagg as your backend or ipython in pylab mode

  > ipython -pylab

JDH

···

On Sat, Feb 9, 2008 at 11:05 AM, Jon Loehrke <jloehrke@...1874...> wrote: