wxpython warnings

I

Iain King

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
 
P

Philippe Martin

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
 
M

Michele Petrazzo

Philippe said:
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
 
I

Iain King

Michele said:
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
 
C

Chris Mellon

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.
 
P

Philippe Martin

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,294
Messages
2,571,511
Members
48,200
Latest member
SCPKatheri

Latest Threads

Top