469,914 Members | 2,480 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,914 developers. It's quick & easy.

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

Apr 26 '06 #1
5 1958
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:
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


Apr 26 '06 #2
Philippe Martin wrote:
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


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

Apr 26 '06 #3

Michele Petrazzo wrote:
Philippe Martin wrote:
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


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.


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

bah

Iain

Apr 26 '06 #4
On 26 Apr 2006 05:32:19 -0700, Iain King <ia******@gmail.com> wrote:
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?

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.EnableLogging. Note that this
will suppress *all* warning and error messages that libtiff (or wx)
might raise.
Iain

--
http://mail.python.org/mailman/listinfo/python-list

Apr 26 '06 #5
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:
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


Apr 26 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by SeeBelow | last post: by
25 posts views Thread by BJörn Lindqvist | last post: by
1 post views Thread by timothy.williams | last post: by
1 post views Thread by James Stroud | last post: by
reply views Thread by Robin Dunn | last post: by
reply views Thread by ianaré | last post: by
4 posts views Thread by stef | last post: by
YarrOfDoom
4 posts views Thread by YarrOfDoom | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.