wxpython warnings

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Iain King

    #1

    wxpython warnings

    I have a wxpython program that displays TIF images. Sometimes it will
    encounter a tag the tiff loader cant handle. Rather than silently
    ignoring it, it pops up a window:

    Python Warning
    unknown field with tag blah blah

    I don't want it to do this, but I can't work out how to turn it off.
    Anyone know?

    Iain

  • Philippe Martin

    #2
    Re: wxpython warnings

    I had a similar but simple problem (the file was missing) and had to check
    by hand before calling wxPython.

    Can you check the tag by hand before calling wxPython ?


    Philippe




    Iain King wrote:
    [color=blue]
    > I have a wxpython program that displays TIF images. Sometimes it will
    > encounter a tag the tiff loader cant handle. Rather than silently
    > ignoring it, it pops up a window:
    >
    > Python Warning
    > unknown field with tag blah blah
    >
    > I don't want it to do this, but I can't work out how to turn it off.
    > Anyone know?
    >
    > Iain[/color]

    Comment

    • Michele Petrazzo

      #3
      Re: wxpython warnings

      Philippe Martin wrote:[color=blue]
      > I had a similar but simple problem (the file was missing) and had to
      > check by hand before calling wxPython.
      >
      > Can you check the tag by hand before calling wxPython ?
      >
      >
      > Philippe
      >
      >[/color]

      Hi,
      also I have the same problem with g3/g4 images. My solution was convert
      that image *before* to .png before... Very bad hack, but work.
      I think that is an internal wxWidgets message (warning), passed to the
      wxPython subsystem.

      Have you tried to wrote to the wxpython ml?

      Michele

      Comment

      • Iain King

        #4
        Re: wxpython warnings


        Michele Petrazzo wrote:[color=blue]
        > Philippe Martin wrote:[color=green]
        > > I had a similar but simple problem (the file was missing) and had to
        > > check by hand before calling wxPython.
        > >
        > > Can you check the tag by hand before calling wxPython ?
        > >
        > >
        > > Philippe
        > >
        > >[/color]
        >
        > Hi,
        > also I have the same problem with g3/g4 images. My solution was convert
        > that image *before* to .png before... Very bad hack, but work.
        > I think that is an internal wxWidgets message (warning), passed to the
        > wxPython subsystem.
        >[/color]

        This is actually exactly what I did. (well, I converted to jpg, because
        they're going to end up as jpg anyway).

        bah

        Iain

        Comment

        • Chris Mellon

          #5
          Re: wxpython warnings

          On 26 Apr 2006 05:32:19 -0700, Iain King <iainking@gmail .com> wrote:[color=blue]
          > I have a wxpython program that displays TIF images. Sometimes it will
          > encounter a tag the tiff loader cant handle. Rather than silently
          > ignoring it, it pops up a window:
          >
          > Python Warning
          > unknown field with tag blah blah
          >
          > I don't want it to do this, but I can't work out how to turn it off.
          > Anyone know?
          >[/color]

          This is actually an error generated by libtiff, which wxWidgets traps
          & raises. It is shown via the wxLog mechanism so you can supress it by
          wrapping your call in calls to wx.Log.EnableLo gging. Note that this
          will suppress *all* warning and error messages that libtiff (or wx)
          might raise.
          [color=blue]
          > Iain
          >
          > --
          > http://mail.python.org/mailman/listinfo/python-list
          >[/color]

          Comment

          • Philippe Martin

            #6
            Re: wxpython warnings

            Hi,

            This is an answer I got from the wxPython NG:

            """
            If it is a wxLog message (I think it is) then you can temporarily
            disable log messages by creating an instance of wx.LogNull.  Or you can
            do something like set the log target to some other object than the
            default wx.LogGui, or set the log level to a higher level so those
            messages are not logged.
            """

            Regards,

            Philippe



            Iain King wrote:
            [color=blue]
            > I have a wxpython program that displays TIF images. Sometimes it will
            > encounter a tag the tiff loader cant handle. Rather than silently
            > ignoring it, it pops up a window:
            >
            > Python Warning
            > unknown field with tag blah blah
            >
            > I don't want it to do this, but I can't work out how to turn it off.
            > Anyone know?
            >
            > Iain[/color]

            Comment

            Working...