Turn off exiv2 Error output?

Asked by Jeffrey Nelson

A friend wanted a script to parse some aperature statistics from a bunch of images he took with his Cannon cameras. Some of these images are apparently corrupted and report errors to the console when I try to read the metadata. An examples of this is the following:
Error: Directory Unknown with 10825 entries considered invalid; not read.
Error: Directory GPSInfo: Next pointer is out of bounds; ignored.
Error: Directory Thumbnail: Next pointer is out of bounds; ignored.

This is generated via the following code:
image_metadata = pyexiv2.metadata.ImageMetadata(image_file)
image_metadata.read() # This line generates errors.

How can I stop these errors from being printed to the console?

Question information

Language:
English Edit question
Status:
Answered
For:
pyexiv2 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Olivier Tilloy (osomon) said :
#1

This issue was tracked by bug #507620, fixed in the recently released pyexiv2 0.3.0.
To get rid of the errors printed on the console, you will need to upgrade to this version.

Can you help with this problem?

Provide an answer of your own, or ask Jeffrey Nelson for more information if necessary.

To post a message you must log in.