traceback with warning/error messages

Discussion in 'Python' started by Jean Brouwers, Jul 17, 2004.

  1. 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.
    Jean Brouwers, Jul 17, 2004
    #1
    1. Advertising

  2. Jean Brouwers

    Jarek Zgoda Guest

    Jean Brouwers <> 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/
    Jarek Zgoda, Jul 17, 2004
    #2
    1. Advertising

  3. 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 <cdblrq$26h$>, Jarek Zgoda
    <> wrote:

    > Jean Brouwers <> 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.
    Jean Brouwers, Jul 18, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stef Mientki
    Replies:
    0
    Views:
    233
    Stef Mientki
    Aug 6, 2007
  2. David Mathog
    Replies:
    7
    Views:
    330
    Richard Tobin
    Jan 11, 2008
  3. Jack Bates
    Replies:
    0
    Views:
    277
    Jack Bates
    May 2, 2011
  4. John B. Matthews
    Replies:
    0
    Views:
    755
    John B. Matthews
    Dec 9, 2011
  5. Roedy Green
    Replies:
    5
    Views:
    2,306
    Gene Wirchenko
    Dec 13, 2011
Loading...

Share This Page