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

traceback with warning/error messages

P: n/a

Sporadically, a message like this one shows up in our wxPython
application:

(main.py:3182): Gtk-WARNING **: gtk_menu_attach_to_widget(): menu
already attached to GtkMenuItem

Is possible but tedious to find the cause of the message by inserting
print statements. Is there an easier way, e.g. a traceback in Python
when lower level messages occur?

/Jean Brouwers

PS) This is wxPython 2.4.1.2 and Python 2.3.2 on Linux.
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Jean Brouwers <JB***********************@no.spam.net> pisze:
Sporadically, a message like this one shows up in our wxPython
application:

(main.py:3182): Gtk-WARNING **: gtk_menu_attach_to_widget(): menu
already attached to GtkMenuItem

Is possible but tedious to find the cause of the message by inserting
print statements. Is there an easier way, e.g. a traceback in Python
when lower level messages occur?
I see similar messages generated by (pure C++) wxWidgets applications,
such as poedit, when running on Linux, so I think it's a matter of bugs
in GTK backend implementation in wxWidgets, that propagate to wxPython.
PS) This is wxPython 2.4.1.2 and Python 2.3.2 on Linux.


You will see this in 2.5.1 even more often.

--
Jarek Zgoda
http://jpa.berlios.de/
Jul 18 '05 #2

P: n/a

In our particular case the warning message was not due to a bug in GTK.
The problem was that we were reusing a submenu in more than one popup
menu. But it took a while to reproduce the problem and figure that
out.

It would be very helpful if a Python traceback could be printed along
with an error or warning message from any of the lower levels in
wxPython**. Especially if such messages are going to happen more
often.

/Jean Brouwers

**) For example, instead of just printing the message, raise an
exception instead if some config option or environment variable is set.

In article <cd**********@nemesis.news.tpi.pl>, Jarek Zgoda
<jz****@gazeta.usun.pl> wrote:
Jean Brouwers <JB***********************@no.spam.net> pisze:
Sporadically, a message like this one shows up in our wxPython
application:

(main.py:3182): Gtk-WARNING **: gtk_menu_attach_to_widget(): menu
already attached to GtkMenuItem

Is possible but tedious to find the cause of the message by inserting
print statements. Is there an easier way, e.g. a traceback in Python
when lower level messages occur?


I see similar messages generated by (pure C++) wxWidgets applications,
such as poedit, when running on Linux, so I think it's a matter of bugs
in GTK backend implementation in wxWidgets, that propagate to wxPython.
PS) This is wxPython 2.4.1.2 and Python 2.3.2 on Linux.


You will see this in 2.5.1 even more often.

Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.