ExifTool Forum

ExifTool => Developers => Topic started by: alexs77 on December 01, 2010, 12:57:49 PM

Title: Relating error messages to files
Post by: alexs77 on December 01, 2010, 12:57:49 PM
Hi.

I start exiftool in the background with this command:

exiftool -stay_open True -@ /tmp/exiftool.args &

Then I write commands to the exifool.args file, like such:

-overwrite_original_in_place
-P
-codedcharacterset=UTF8
-UserComment=A sample User Comment
-Comment=A sample Comment
-iptc:keywords-=sample
-iptc:keywords+=sample
-Keywords-=sample
-Keywords+=sample
/Users/Shared/Pictures/Photos/Sample.jpg
-execute


Works quite well and pretty fast. But from time to time, I get error messages...  :(

{ready}
    1 imWarning: [minor] IPTC:Keywords exceeds length limit (truncated)
Warning: [minor] IPTC:Keywords exceeds length limit (truncated)
Warning: [minor] IPTC:Keywords exceeds length limit (truncated)
age files updated
{ready}
    1 image files updated


How do I know now which file caused this error?

Cheers,
Alexander
Title: Re: Relating error messages to files
Post by: Phil Harvey on December 01, 2010, 01:07:37 PM
Hi Alexander,

I'm glad this is working well for you.  It is cool running exiftool as a daemon like this.

If a warning is associated with a specific file then the file name will be printed in the warning message.  The message you mentioned occurs when you set the new value, before writing of any file occurs.

- Phil
Title: Re: Relating error messages to files
Post by: alexs77 on December 01, 2010, 01:55:21 PM
Hi Phil!

Hm, no, no filename is printed. I actually start exiftool like this:

"$exiftool" -stay_open True -@ "$argfile" 2>&1 | tee "$logfile" &

In "$logfile", I then have exactly the message I pasted - I'll attach the "$logfile" to this post.

Actually, in my program, I generate a lot of commands and paste into "$argfile". These commands look like the ones I pasted earlier. I paste A LOT of commands. I do not wait until one file is processed completely by exiftool before I paste new commands.

Alexander
Title: Re: Relating error messages to files
Post by: Phil Harvey on December 01, 2010, 02:10:07 PM
Hi Alexander,

Yes, I understand, but exiftool is designed to process multiple files with each command.  Your error is associated with the command itself, not with any file being processed.  For this reason, the warning doesn't contain a file name.

You may have to count the "{ready}" terminators in order to match up a warning message like this to a specific command.

- Phil