473,320 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

wxPython bug

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
3 1382
Jive wrote:
[...]
What to do?


Ask in comp.soft-sys.wxwindows
Jul 18 '05 #2
> [...]
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: SeeBelow | last post by:
Do many people think that wxPython should replace Tkinter? Is this likely to happen? I ask because I have just started learning Tkinter, and I wonder if I should abandon it in favor of...
25
by: BJörn Lindqvist | last post by:
See: http://www.wxpython.org/quotes.php. especially: "wxPython is the best and most mature cross-platform GUI toolkit, given a number of constraints. The only reason wxPython isn't the standard...
1
by: timothy.williams | last post by:
I'm trying to install wxPython 2.5.3.1 using Python 2.3.2 on a Fedora 2 machine. I have python in a non-standard place, but I'm using --prefix with the configure script to point to where I have...
1
by: James Stroud | last post by:
Hello All, I will soon have an excuse to install a new operating system on my computer. I would like to know exactly what operating system I should have so that I can get wxPython going....
25
by: TPJ | last post by:
GUI's etc: PyGtk on Windows "(...) So if someone develops mainly for X and just wants to make sure that it is not impossible to run on Windows, you can use PyGTK. (...)", July 2nd, 1999 pyGTK...
22
by: Glurt Wuntal | last post by:
I am a newbie with Python. It's a great language, but I would like to be able to present a simple gui menu for some of my scripts; something better than using 'raw_input' prompts. Any...
0
by: Robin Dunn | last post by:
Announcing ---------- The 2.6.3.0 release of wxPython is now available for download at http://wxpython.org/download.php. There have been many enhancements and fixes implemented in this...
0
by: Robin Dunn | last post by:
Announcing ---------- The 2.6.3.0 release of wxPython is now available for download at http://wxpython.org/download.php. There have been many enhancements and fixes implemented in this...
0
by: Robin Dunn | last post by:
Announcing ---------- The 2.6.3.2 release of wxPython is now available for download at http://wxpython.org/download.php. This is a mostly bug fix release and takes care of several "unfortunate...
4
by: stef | last post by:
hello, I'm trying to move from Delphi to Python (move from MatLab to Python already succeeded, also thanks to this discussion group). From the discussions in this list about "the best" GUI for...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.