Why is it that if I have a syntax error in a wxpython program that it
doesn't show me where the problem is? I get this print out about memory
leaks and whatnot, when the real problem is that I just had a syntax error.
Is it possible to see normal python tracebacks?
Why is it that if I have a syntax error in a wxpython program that it
doesn't show me where the problem is? I get this print out about memory
leaks and whatnot, when the real problem is that I just had a syntax error.
Is it possible to see normal python tracebacks?
When I've had this problem, it was because I was creating a window
without a parent. As long as all my windows have parents, all the way
back to the wxApp-derived class, I see tracebacks.
I also get it if I use a message-handling macro but misspell the name of the
function, or forget to write the function. If I recall, it happens in a few
other situations as well.
···
----- Original Message -----
From: "Patricia Hawkins" <phawkins@connact.com>
To: <wxpython-users@lists.wxwindows.org>
Sent: Tuesday, August 28, 2001 7:29 AM
Subject: Re: [wxPython] error messages
> Why is it that if I have a syntax error in a wxpython program that it
> doesn't show me where the problem is? I get this print out about
memory
> leaks and whatnot, when the real problem is that I just had a syntax
error.
> Is it possible to see normal python tracebacks?
When I've had this problem, it was because I was creating a window
without a parent. As long as all my windows have parents, all the way
back to the wxApp-derived class, I see tracebacks._______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users
Why is it that if I have a syntax error in a wxpython program that it
doesn't show me where the problem is? I get this print out about memory
leaks and whatnot, when the real problem is that I just had a syntax
error.
Is it possible to see normal python tracebacks?
It depends on where the error occurs. If it is in a callback or event
handler then PyErr_Print() is called. It is supposed to print the full
traceback but I've also seen that in some situations it only prints the
actual error without the traceback...
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!
I am not understanding. If I create a class that inherits from some wx
class, and in the __init__ function try to call a function but misspell it,
I get a memory dump and all of that stuff. Why can't I just get it to show
me the line where I am trying to call a function that doesn't exist?
···
----- Original Message -----
From: "Robin Dunn" <robin@alldunn.com>
To: <wxpython-users@lists.wxwindows.org>
Sent: Tuesday, August 28, 2001 10:40 AM
Subject: Re: [wxPython] error messages
> Why is it that if I have a syntax error in a wxpython program that it
> doesn't show me where the problem is? I get this print out about memory
> leaks and whatnot, when the real problem is that I just had a syntax
error.
> Is it possible to see normal python tracebacks?It depends on where the error occurs. If it is in a callback or event
handler then PyErr_Print() is called. It is supposed to print the full
traceback but I've also seen that in some situations it only prints the
actual error without the traceback...--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users
I am not understanding. If I create a class that inherits from some wx
class, and in the __init__ function try to call a function but misspell
it,
I get a memory dump and all of that stuff. Why can't I just get it to
show
me the line where I am trying to call a function that doesn't exist?
Look above the memory dump.
If you have an error in your main frame's __init__ then it is unable to be
fully created and since there is no frame then the MainLoop exits and so as
the process exits then the memory dump is shown. Most likely the trace back
was already printed before that and has scrolled off the console window.
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!
It appears that wxPython is printing out the normal errors in a window, but
it disappears before I can read the errors. Maybe there is a way to get
that window to stay up?
···
----- Original Message -----
From: "C. Porter Bassett" <porter@et.byu.edu>
To: <wxpython-users@lists.wxwindows.org>
Sent: Monday, September 03, 2001 3:09 PM
Subject: Re: [wxPython] error messages
I am not understanding. If I create a class that inherits from some wx
class, and in the __init__ function try to call a function but misspell
it,
I get a memory dump and all of that stuff. Why can't I just get it to
show
me the line where I am trying to call a function that doesn't exist?
----- Original Message -----
From: "Robin Dunn" <robin@alldunn.com>
To: <wxpython-users@lists.wxwindows.org>
Sent: Tuesday, August 28, 2001 10:40 AM
Subject: Re: [wxPython] error messages> > Why is it that if I have a syntax error in a wxpython program that it
> > doesn't show me where the problem is? I get this print out about
memory
> > leaks and whatnot, when the real problem is that I just had a syntax
> error.
> > Is it possible to see normal python tracebacks?
>
> It depends on where the error occurs. If it is in a callback or event
> handler then PyErr_Print() is called. It is supposed to print the full
> traceback but I've also seen that in some situations it only prints the
> actual error without the traceback...
>
> --
> Robin Dunn
> Software Craftsman
> robin@AllDunn.com Java give you jitters?
> http://wxPython.org Relax with wxPython!
>
>
>
>
>
> _______________________________________________
> wxpython-users mailing list
> wxpython-users@lists.wxwindows.org
> http://lists.wxwindows.org/mailman/listinfo/wxpython-users
>_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users
It appears that wxPython is printing out the normal errors in a window,
but
it disappears before I can read the errors. Maybe there is a way to get
that window to stay up?
See the definition of wxApp in wxPython/wx.py. If you construct your app
with a zero then stdour and stderr will not be redirected to the
wxPyOnDemandOutputWindow. IOW, you are probably doing something like:
app = MyApp()
app.MainLoop()
change it to
app = MyApp(0)
app.MainLoop()
BTW, on *nix boxes the default is to not redirect, so if you want it to then
you need to pass a true value there.
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!
One trick I have used is to start the python interpreter from the directory
that has my wxPython program, then:
execfile('myprogram.py')
This has allowed my to see the python error before wxPython took over again
and dumped it's load.
···
---
Patrick K. O'Brien
Orbtech (http://www.orbtech.com)
"I am, therefore I think."
-----Original Message-----
From: wxpython-users-admin@lists.wxwindows.org
[mailto:wxpython-users-admin@lists.wxwindows.org]On Behalf Of C. Porter
Bassett
Sent: Monday, September 03, 2001 11:02 PM
To: wxpython-users@lists.wxwindows.org
Subject: Re: [wxPython] error messages
It appears that wxPython is printing out the normal errors in a window, but
it disappears before I can read the errors. Maybe there is a way to get
that window to stay up?