Warning: [Minor] Tag 'keywords' not defined - C:/...jpg

Started by ahkahk, March 13, 2020, 09:32:03 PM

Previous topic - Next topic

ahkahk

At first I got this warning:

Warning: [minor] Fixed incorrect URI for xmlns:MicrosoftPhoto

Then I found this solution to rebuild the metadata:

exiftool -all= -tagsfromfile @ -all:all -unsafe -icc_profile

which fixed the problem. But now I get this warning, on some images only:

Warning: [Minor] Tag 'keywords' not defined - C:/...jpg

when I try to send this command:

exiftool -p "${keywords;s/, /,/g}" "C:/...jpg" | clip

This creates a problem with a script I have running in Autohotkey, which I have been unable to circumvent. Ignoring the warning does not fix the problem. So, how can I get the tag defined? Many thanks!

I'm using Exiv2 v0.27.2

StarGeek

Quote from: ahkahk on March 13, 2020, 09:32:03 PM
At first I got this warning:

Warning: [minor] Fixed incorrect URI for xmlns:MicrosoftPhoto

This is a minor warning that you really don't need to worry about.  But if you really want to fix it, you can use this command that is more precise and rebuilds just the Microsoft XMP that's the problem
exiftool -if "$XMP-microsoft:all" -XMP-microsoft:all= -tagsfromfile @ -XMP-microsoft:all <FileOrDir>

QuoteBut now I get this warning, on some images only:

Warning: [Minor] Tag 'keywords' not defined - C:/...jpg

when I try to send this command:

exiftool -p "${keywords;s/, /,/g}" "C:/...jpg" | clip

This creates a problem with a script I have running in Autohotkey, which I have been unable to circumvent. Ignoring the warning does not fix the problem. So, how can I get the tag defined?

Add some keywords to the problem files.  The files that return that have no keywords. Or you could add the -f (ForcePrint) option which will display a dash - for files that don't have the tag defined.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

ahkahk

The pictures that give the XMP warning do not return anything to the clipboard (via the "| clip" command) even though they do have keywords seen by windows explorer. I don't know that it is the warning that causes it, but something is wrong with these pictures.

QuoteAdd some keywords to the problem files.  The files that return that have no keywords.
Windows explorer shows they have keywords, but still the clipboard shows nothing. The -f command shows a dash.

When I run the -XMP... command you showed me, I get the "keywords not defined" warning, and when I add a keyword to the image (on top of those already there, unseen by Exiftool), it goes back to the "incorrect URI" warning again.

This is only true for some pictures, and they are ones that I've tagged years ago.

StarGeek

Windows will fill the "Tags" property from three different tags, IPTC:Keywords, XMP:Subject, and XPKeywords.  If you check you'll find that the data in one of the others, probably XMP:Subject.

The command I gave is used to only fix one issue, the Fixed incorrect URI for xmlns:MicrosoftPhoto warning. It does nothing about the keywords.  The reason this warning pops up is because Microsoft changed their minds about the URI in the XMP.  See this thread for some details.  This issue can be safely ignored. You can add the -m (ignoreMinorErrors) option to suppress the warning.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

ahkahk

Thank you for identifying the problem! They were indeed in XMP:Subject, so I did:

exiftool "-IPTC:Keywords<XMP:Subject" DIR

and now everything works like a charm