By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,442 Members | 1,302 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,442 IT Pros & Developers. It's quick & easy.

wxPython bug

P: n/a
Anyone know what's up with this, and how to fix it?

(I'm running MS Windows 2000 Pro, SP 4)

In wxPython 2.5, run the demo, samples/wxProject/wxProject.py

Create a new project and add a file to it. In the console window you will
probably
see something like this:

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
Traceback (most recent call last):
File "C:\Python23\Lib\site-packages\wxPython2.5 Docs and
Demos\samples\wxProje
ct\wxProject.py", line 224, in OnFileAdd
self.project_save()
File "C:\Python23\Lib\site-packages\wxPython2.5 Docs and
Demos\samples\wxProje
ct\wxProject.py", line 137, in project_save
(child,iter) = self.tree.GetFirstChild(self.root,iter)
File "C:\PYTHON23\Lib\site-packages\wx-2.5.3-msw-ansi\wx\_controls.py",
line 5
235, in GetFirstChild
return _controls_.TreeCtrl_GetFirstChild(*args, **kwargs)
TypeError: TreeCtrl_GetFirstChild() takes exactly 2 arguments (3 given)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^

In the source code _controls.py, the comments say the file was created by
SWIG.

What to do?

Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Jive wrote:
[...]
What to do?


Ask in comp.soft-sys.wxwindows
Jul 18 '05 #2

P: n/a
> [...]
What to do?


Open up wxProject.py and fix the problem. The traceback is pretty
clear:
On line 137 in wxProject.py, the method GetFirstChild expects 2
arguments, but was given 3.

Unfortunately the wx documentation is not very clear about the
GetFirstChild method. It
only says:
wxPython note: In wxPython the returned wxTreeItemId and the new
cookie value are both returned as a tuple containing the two values.
It should also mention that it (GetFirstChild) only takes one parameter
(item)

For future reference: keep the wxPython api docs
(http://www.wxpython.org/docs/api/) close.

/Johan Lindberg

Jul 18 '05 #3

P: n/a
Jive <so*****@microsoft.com> wrote:
In wxPython 2.5, run the demo, samples/wxProject/wxProject.py
[ ... ]
TypeError: TreeCtrl_GetFirstChild() takes exactly 2 arguments (3 given)
GetFirstChild() changed from taking 2 arguments in wxPython 2.4 to
(the more sensible) 1 in wxPython 2.5. Clearly wxProject hasn't
been thoroughly 2.5ified. (Looking at it, it's not using the wx
namespace, so I'd say it's not been 2.5ified at all.)
What to do?


(a) Fix your copy of wxProject.py (someone else has already
pointed this out).

(b) File a bug report (http://sourceforge.net/tracker/?grou...63&atid=109863)
with a "wxPython specific" category.

--
\S -- si***@chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
___ | "Frankly I have no feelings towards penguins one way or the other"
\X/ | -- Arthur C. Clarke
her nu becomež se bera eadward ofdun hlęddre heafdes bęce bump bump bump
Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.