Hi
I decided to upgrade my Gentoo system a couple days ago. For the past few years, in my experience, this has been an exercise in destruction, but this time it went pretty well. However, my wxpython doesn't seem to work correctly now.
I have installed:
gcc-4.1.1 (upgraded from 3.something)
glibc-2.5
wxGTK-2.6.3.3
wxpython-2.6.3.3
python-2.5
wxpython-docs-2.6.0.0
Running /usr/share/doc/wxpython-docs-2.6.0.0-r1/demo $ ./demo.py I get the splash screen, then:
···
--------------------------------------------------------------------
(python:6332): Gdk-CRITICAL **: gdk_window_invalidate_rect: assertion `window != NULL' failed
(python:6332): Gdk-CRITICAL **: gdk_window_invalidate_rect: assertion `window != NULL' failed
(python:6332): Gdk-CRITICAL **: gdk_window_invalidate_rect: assertion `window != NULL' failed
Traceback (most recent call last):
File "/usr/share/doc/wxpython-docs-2.6.0.0-r1/demo/Main.py", line 1684, in OnClose
frame = wxPythonDemo(None, "wxPython: (A Demonstration)")
File "/usr/share/doc/wxpython-docs-2.6.0.0-r1/demo/Main.py", line 1308, in __init__
self.LoadDemo(self.overviewText)
File "/usr/share/doc/wxpython-docs-2.6.0.0-r1/demo/Main.py", line 1375, in LoadDemo
self.LoadDemoSource()
File "/usr/share/doc/wxpython-docs-2.6.0.0-r1/demo/Main.py", line 1393, in LoadDemoSource
self.codePage = DemoCodePanel(self.nb, self)
File "/usr/share/doc/wxpython-docs-2.6.0.0-r1/demo/Main.py", line 570, in __init__
wx.RIGHT | wx.LEFT | wx.ALIGN_CENTER_VERTICAL, 5)
File "/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx/_core.py", line 11711, in Add
return _core_.Sizer_Add(*args, **kwargs)
TypeError: wx.Window, wx.Sizer, wx.Size, or (w,h) expected for item
----------------------------------------------------------------------
Running xrced gives me a similar response:
----------------------------------------------------
Traceback (most recent call last):
File "./xrced", line 3, in <module>
import xrced
File "/usr/lib/python2.5/site-packages/xrced.py", line 4, in <module>
main()
File "/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx/tools/XRCed/xrced.py", line 1268, in main
app = App(0, useBestVisual=False)
File "/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx/_core.py", line 7700, in __init__
self._BootstrapApp()
File "/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx/_core.py", line 7352, in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx/tools/XRCed/xrced.py", line 1236, in OnInit
frame = Frame(pos, size)
File "/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx/tools/XRCed/xrced.py", line 263, in __init__
sizer.Add(wxStaticLine(self, -1), 0, wxEXPAND)
File "/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx/_core.py", line 11711, in Add
return _core_.Sizer_Add(*args, **kwargs)
TypeError: wx.Window, wx.Sizer, wx.Size, or (w,h) expected for item
-------------------------------------------------------------------
The programs I have been working on generate similar errors.
It is that last line that has me stumped. I can run a simple program such as:
import wx
app = wx.PySimpleApp()
f = wx.Frame(None, -1, 'Test Frame')
f.Show()
app.MainLoop()
Just fine. Aside from upgrading to gcc4.x, I also "unicode" enabled the complete system build, including python and wxpython.
After uninstalling, reinstalling, installing ansi, and trying about everything else I could think of, nothing seems to have really changed. (I'm back to wx-2.6-gtk2-unicode).
Still thinking I've done something wrong, I downloaded wxPython-src-2.8.0.1 and installed it by hand, using the directions on the website for a stand alone development install in /opt. And that one works fine!
I'm stumped. I suspect this is probably a Gentoo problem, but maybe someone out there has seen this and can give me some direction on what to try next? I've not been able to spot anything with Google or on the Gentoo boards.
Thanks for any insight ...
Peter