Exiftools fails updating metadata

Started by Carlo Didier, August 27, 2014, 03:44:59 PM

Previous topic - Next topic

Carlo Didier

I'm currently cleaning up a lot of images (417) which contain keywords that I want to remove.
When I tried to first delete all keywords, then write pending metadata changes to the files, lots of them failed, even after repeatedly clearing keywords and writing back, they always re-appeared. I checked in Bridge and the keywords are still in the files.

I finally tried to analyse the problem with fewer images and generated a log for that.

It looks like Exiftool has a problem with certain files. Here is the typical error seen on the Exiftool Output window:
Warning: Error converting value for ExifIFD:SubSecTimeOriginal (ValueConvInv) - ...

Attached the complete output and the iMatch log file.

Not really an iMatch bug, but I'd like to know how I can correct this or force Exiftool to ignore these errors.


[attachment deleted by admin]

Mario

Warning: Error converting value for ExifIFD:SubSecTimeOriginal (
That's just a warning and it can be ignored. ET always prints that when the file contains no subsecond data.
The log looks good, ExifTool did not report a failed write for any of these files.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Carlo Didier

I can still reproduce the problem, even with DNGs.

Mario

What problem????? There is no problem, at least not from your log files.
The Warning about the subseconds does not cause any problems. ExifTool just tells you that your files do not contain subsecond precision time data for EXIF, which is pretty much standard for most cameras.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Carlo Didier

The problem is that the keywords are not removed from the files.
Here's the thing I do:
- select some images with pending metadata writeback because there are keywords in the metadata (but not in the XMP part, that's why iMatch wants to update XMP)
- in the keywords panel, select "delete all keywords" -> the keywords become barred
- click the check icon in the top left corner of the keywords panel -> the keywords disappear from the keywords panel and the yellow pencil appears on the thumbnails
- click the yellow pencil on the images
- iMatch "updates" the files, but shortly after, the keywords re-appear, even after repeated updates and deletes

Mario

1. After write-back, when you look at your files in the ExifTool Command Processor:
Do the keywoirds in IPTC and the keywords in XMP::dc Subject match the keywords in XMP hierarchical keywords?

2. Which settings do you use for IPTC->XMP import? Edit > Preferences > Metadata 2?
3. Which settings do you use for XMP->IPTC keyword mapping and flatten?

Usually keyword fail to be deleted if IMatch is not allowed to synch XMP to IPTC on write-back. But your log clearly shows that IMatch is deleting all keywords in the file

-Composite:Keywords=
-IPTC:Keywords=
-XMP-lr:HierarchicalSubject=
-XMP-dc:Subject=

e.g. P:\Photos Carlo\2005\12\2005-12-27 Snow at night\D20051227052_B&W1 for FM.tif

ExifTool reports that the file is updated, no errors. If you have a file which reproduces this at will, please attach or send to me. It may take a couple of weeks because my "Files to look at" queue is full but I will check it out.

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Carlo Didier

I could send you several hundred files with this problem ...  :) But I'll only mail one to you.
Note that I can easily remove the keywords in Bridge CC. That works, but it's more difficult to find and select all the files as they are in multiple folders.

Attached are my metadata settings. I have no keyword mapping defined as I don't use keywords i iMatch (that's why I want to delete all keywords from the files that have them).

I now noticed that some files display keywords in iMatch although they have been removed from the files ... this looks more like iMatch not seeing the changes in the files (even though they were done by iMatch itself, or rather by exiftools).

I'll have to investigate a bit more and only send you a sample file when I know more.


[attachment deleted by admin]

Carlo Didier

New info: What I see in the keywords in iMatch is actually in the [XMP-dc] Subject field in the files ...  :(

Ferdinand

This sounds like the same problem I had yesterday when helping my brother clean up his metadata after the migration to IMatch 5.  We wanted to clear out all his legacy keywords, so that we could start @Keywords with a clean slate.

Here is how we eventually did it.  There is an ExifTool Command Processor preset called "All Keywords".  You can easily turn this into a "Delete All Keywords" preset by putting an equals  sign at the end of of three lines, and add an overwrite command:

-overwrite_original_in_place
-IPTC:Keywords=
-XMP:Subject=
-XMP:HierarchicalSubject=
{Files}


At this stage IMatch will think that there are still keywords that it needs to write.  You solve this by doing a refresh of the metadata for these files via SHFT-CTRL-F5.  This should solve your problem.

The problem with what I think you have been doing is that IMatch isn't deleting the flat keywords when you give the delete all keywords command, and it rereads them back in and wants to write corresponding hierarchical keywords.  As I was driving this PC via remote control I was having trouble working out whether this was a bug or my faulty understanding, but the approach I just described above worked.  I even let IMatch write out the hierarchical keywords that I wanted to write, so that the flat and hierarchical keywords were in sync, and then use the delete all keywords command, but that still didn't work.  Given the lag inherent in controlling a PC by remote control it was hard to be sure what the cause of this was.  Upon reflection I think it was a bug.

Carlo Didier

#9
Thanks, Ferdinand! Your "Delete All Keywords" works ... except for a number of my DNGs where I get the error "Error: [minor] Error reading PreviewImage data in MakerNotes - ...".
I'll try to get exiftool to ignore that.

Update: added the -m option so it now only gives warnings and correctly updates the files

Ferdinand

Good point about the -m

There is still an aspect of this that puzzles me. :
.  You have flat keywords in a file that you ingest into IMatch.
.  IMatch treats these as keywords and wants to write to the hierarchical subject field to keep this field and the flat field intact.
.  You commit the writeback so these fields in the files are in sync.
.  Then you delete all keywords and commit the change.
.  But as in both your case and my brother's the flat fields were not wiped - why??
.  Even more puzzling is the fact that he sent me one of these files and I tried this work-flow and it worked in my DB.  Why on my machine and not yours and his?

Sometimes it's simpler to fix things up outside of IMatch, as you are in effect with the ECP, and then force a metadata refresh.

Carlo Didier

At least I now know why I have keywords displayed in iMatch when I never conciously entered keywords in my images. I had entered some information in the Subject field in Bridge and iMatch imports that as keywords. Got to clean up 9000 files now ...  :(

Ferdinand

My poor brother gets mentioned a lot at the moment, but he just had the same problem.  With a new-found enthusiasm for sorting out his metadata (with IMatch 5 he is he is like a child with a new toy) he started putting information into the Subject field, thinking that it was the Title field.  It's a poor choice of field name by Adobe for the flat keywords field.  So I had to give him a crash "Keywords 101" course, and also showed him the args files that IMatch uses.  Windows doesn't help either, as it uses another set of names for some of these fields - very confusing!!

Mario

Quote from: Carlo Didier on August 28, 2014, 12:19:35 PM
At least I now know why I have keywords displayed in iMatch when I never conciously entered keywords in my images. I had entered some information in the Subject field in Bridge and iMatch imports that as keywords. Got to clean up 9000 files now ...  :(

The subject field are the (flat) keywords. Don't ask my why Adobe used that term to describe keywords. Hierarchical Keywords are stored in the hierarchicalSubject tag, btw. If you input metadata in different applications, be extra careful to understand what goes where. Adobe is notorious to use their own names for many metadata tags.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook