On 30/04/2013 06:29, Robin Dunn wrote:
...
>
> Is there any more to that traceback? I don't see where the call to
> ProcessIdle is coming from.
That was it, I'll give you another one below.
This only happens in my code when I use matplotlib stuff - it doesn't
happen when I use the simple wxembedded sample to test.
There is no call to ProcessIdle in my code and the one time where I see
it in matplotlib it is commented out, but instead they call wx.WakeUpIdle()
I see in FigureCanvasWx in matplotlib they are using a timer in
"draw_idle" which in turn calls _onDrawIdle which uses
wx.GetApp().Pending which I can only find in 2.8 wx doc and not in 2.9.5
nor Phoenix.
Werner
P.S.
Below two tracebacks I get from the same script just by restarting it.
Start my script with matplot figures in WingIDE:
AttributeError: 'BaseApp' object has no attribute 'ProcessIdle'
File "c:\dev\twcbv4\twcbsrc\controllers\app_stats.py", line 863, in <module>
apprb = Appstats(None, standalone=True)
File "c:\dev\twcbv4\twcbsrc\controllers\app_stats.py", line 204, in __init__
self.setupControls()
File "c:\dev\twcbv4\twcbsrc\controllers\app_stats.py", line 237, in
setupControls
self.createStatsPanes()
File "c:\dev\twcbv4\twcbsrc\controllers\app_stats.py", line 374, in
createStatsPanes
self.paneStatsRegionBlt.axes =
self.paneStatsRegionBlt.figure.add_subplot(noRow, noCol, 1)
File "c:\Python27\Lib\site-packages\matplotlib\figure.py", line 882, in
add_subplot
a = subplot_class_factory(projection_class)(self, *args, **kwargs)
File "c:\Python27\Lib\site-packages\matplotlib\axes.py", line 8938, in
__init__
self._axes_class.__init__(self, fig, self.figbox, **kwargs)
File "c:\Python27\Lib\site-packages\matplotlib\axes.py", line 461, in
__init__
self._init_axis()
File "c:\Python27\Lib\site-packages\matplotlib\axes.py", line 521, in
_init_axis
self.yaxis = maxis.YAxis(self)
File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 651, in
__init__
self.cla()
File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 732, in cla
self.reset_ticks()
File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 745, in
reset_ticks
self.majorTicks.extend([self._get_tick(major=True)])
File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 1839, in
_get_tick
return YTick(self.axes, 0, '', major=major, **tick_kw)
File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 139, in
__init__
self.tick1line = self._get_tick1line()
File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 524, in
_get_tick1line
zorder=self._zorder,
File "c:\Python27\Lib\site-packages\matplotlib\lines.py", line 209, in
__init__
self.set_fillstyle(fillstyle)
File "c:\Python27\Lib\site-packages\matplotlib\lines.py", line 321, in
set_fillstyle
self._marker.set_fillstyle(fs)
File "c:\Python27\Lib\site-packages\matplotlib\markers.py", line 150, in
set_fillstyle
self._recache()
File "c:\Python27\Lib\site-packages\matplotlib\markers.py", line 127, in
_recache
self._path = Path(np.empty((0,2)))
File "c:\Python27\Lib\site-packages\matplotlib\path.py", line 116, in
__init__
vertices = np.asarray(vertices, np.float_)
File "c:\Python27\Lib\site-packages\numpy\core\numeric.py", line 235, in
asarray
return array(a, dtype, copy=False, order=order)
Restart the same script:
AttributeError: 'BaseApp' object has no attribute 'ProcessIdle'
File "c:\dev\twcbv4\twcbsrc\controllers\app_stats.py", line 863, in <module>
apprb = Appstats(None, standalone=True)
File "c:\dev\twcbv4\twcbsrc\controllers\app_stats.py", line 204, in __init__
self.setupControls()
File "c:\dev\twcbv4\twcbsrc\controllers\app_stats.py", line 237, in
setupControls
self.createStatsPanes()
File "c:\dev\twcbv4\twcbsrc\controllers\app_stats.py", line 409, in
createStatsPanes
self.paneStatsDtypePaC.axes =
self.paneStatsDtypePaC.figure.add_subplot(noRow, noCol, 1)
File "c:\Python27\Lib\site-packages\matplotlib\figure.py", line 882, in
add_subplot
a = subplot_class_factory(projection_class)(self, *args, **kwargs)
File "c:\Python27\Lib\site-packages\matplotlib\axes.py", line 8938, in
__init__
self._axes_class.__init__(self, fig, self.figbox, **kwargs)
File "c:\Python27\Lib\site-packages\matplotlib\axes.py", line 472, in
__init__
self.cla()
File "c:\Python27\Lib\site-packages\matplotlib\axes.py", line 860, in cla
spine.cla()
File "c:\Python27\Lib\site-packages\matplotlib\spines.py", line 157, in cla
self.axis.cla()
File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 732, in cla
self.reset_ticks()
File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 745, in
reset_ticks
self.majorTicks.extend([self._get_tick(major=True)])
File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 1839, in
_get_tick
return YTick(self.axes, 0, '', major=major, **tick_kw)
File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 140, in
__init__
self.tick2line = self._get_tick2line()
File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 541, in
_get_tick2line
l.set_transform(self.axes.get_yaxis_transform(which='tick2'))
File "c:\Python27\Lib\site-packages\matplotlib\axes.py", line 681, in
get_yaxis_transform
return self.spines['right'].get_spine_transform()
File "c:\Python27\Lib\site-packages\matplotlib\spines.py", line 374, in
get_spine_transform
self._ensure_position_is_set()
File "c:\Python27\Lib\site-packages\matplotlib\spines.py", line 140, in
_ensure_position_is_set
self.set_position(self._position)
File "c:\Python27\Lib\site-packages\matplotlib\spines.py", line 365, in
set_position
self.axis.cla()
File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 732, in cla
self.reset_ticks()
File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 745, in
reset_ticks
self.majorTicks.extend([self._get_tick(major=True)])
File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 1839, in
_get_tick
return YTick(self.axes, 0, '', major=major, **tick_kw)
File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 139, in
__init__
self.tick1line = self._get_tick1line()
File "c:\Python27\Lib\site-packages\matplotlib\axis.py", line 524, in
_get_tick1line
zorder=self._zorder,
File "c:\Python27\Lib\site-packages\matplotlib\lines.py", line 209, in
__init__
self.set_fillstyle(fillstyle)
File "c:\Python27\Lib\site-packages\matplotlib\lines.py", line 321, in
set_fillstyle
self._marker.set_fillstyle(fs)
File "c:\Python27\Lib\site-packages\matplotlib\markers.py", line 150, in
set_fillstyle
self._recache()
File "c:\Python27\Lib\site-packages\matplotlib\markers.py", line 135, in
_recache
self._marker_function()
File "c:\Python27\Lib\site-packages\matplotlib\markers.py", line 593, in
_set_tickright
self._transform = Affine2D().scale(1.0, 1.0)
File "c:\Python27\Lib\site-packages\matplotlib\transforms.py", line
1834, in scale
self.invalidate()
File "c:\Python27\Lib\site-packages\matplotlib\transforms.py", line 131,
in invalidate
return self._invalidate_internal(value, invalidating_node=self)
File "c:\Python27\Lib\site-packages\matplotlib\transforms.py", line 153,
in _invalidate_internal
for parent in self._parents.itervalues():
File "c:\Python27\Lib\weakref.py", line 147, in itervalues
for wr in self.data.itervalues():