Newbie Exif tag errors - Tag does not exist

Started by AlexSuarez, August 23, 2011, 04:17:25 PM

Previous topic - Next topic

AlexSuarez

Hello,
New to the exiftool and forum, hoping someone out there has come across this already and can provide assistance.
If anyone can help it's greatly appreciated !! 

I created a exiftool_config file to enter new EXIF tags into an image. It works fine if I am modifying the image right after I make the change to the exiftool_config file, but if I close the command prompt and open a new command prompt and try using the same tag on another image I get "Warning : Tag 'xxxx' does not exist  Nothing to do".  This is making me think it is not seeing the exiftool_config file, so I tried using the -config tag but I still see the same message.  So I'm confused as to whether I have something wrong on the exiftool_config file or am I using the tag's wrong on my command line. 
Again any help is greatly appreciated!

Phil Harvey

If you are sure you command is the same before and after opening a new command window, then the only possible problem is the location of the config file.  What directory is it in?  Also, did you name it ".ExifTool_config"? (Case is important, and it must start with a ".".)  But you say you tried the -config option too -- did you specify the directory for this?  (ie. -config "c:\some\directory\.ExifTool_config")

But it is also possible that something changed with your command.  If you post the config file and your command I can check to see if I see anything obvious.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

AlexSuarez

Hi Phil,
Thanks for taking the time to respond, attaching the code and command line that I am using.  I have the exiftool_config file located in the same directory as the exiftool itself, running on windows xp, and yes do have it named .ExifTool_config.  I had not tried to specify the location of the exiftool_config file, but tried it and same results.

Command Line:
exiftool -config .ExifTool_config -ClientRequest="alexsuarez" C:\TEMP_WORK_FILES\images\E1A136\Top_Page_YELL.jpg

.ExifTool_config Code:

%Image::ExifTool::UserDefined = (
    'Image::ExifTool::Exif::Main' => {
        0xd000 => {
            Name => 'NewEXIFTag',
            Writable => 'int16u',
            WriteGroup => 'IFD0',
        },
    },
    'Image::ExifTool::Exif::Main' => {
        0xd000 => {
            Name => 'ClientRequest',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
    },
    'Image::ExifTool::Exif::Main' => {
        0xd000 => {
            Name => 'CMImageType',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
    },
    'Image::ExifTool::Exif::Main' => {
        0xd000 => {
            Name => 'CMBuyingGroup',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
    },
    'Image::ExifTool::Exif::Main' => {
        0xd000 => {
            Name => 'CMBuyingInterest',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
    },
    'Image::ExifTool::Exif::Main' => {
        0xd000 => {
            Name => 'People',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
    },
    'Image::ExifTool::Exif::Main' => {
        0xd000 => {
            Name => 'AgeSubject',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
    },
    'Image::ExifTool::Exif::Main' => {
        0xd000 => {
            Name => 'Diversity',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
    },
    'Image::ExifTool::Exif::Main' => {
        0xd000 => {
            Name => 'Ethnicity',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
    },
    'Image::ExifTool::Exif::Main' => {
        0xd000 => {
            Name => 'Gender',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
    },
    'Image::ExifTool::Exif::Main' => {
        0xd000 => {
            Name => 'BusinessSpecs',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
    },
    'Image::ExifTool::Exif::Main' => {
        0xd000 => {
            Name => 'SubjectStyle',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
    },
);


Again Thank you!

Phil Harvey

#3
Ah.  The problem is your user-defined tag definition.  There are 2 problems:

1) All of your tags have the same ID.

2) You redefine the Exif::Main structure a number of times, so only the last one (SubjectStyle) will actually work.

Try this config file instead:

%Image::ExifTool::UserDefined = (
    'Image::ExifTool::Exif::Main' => {
        0xd000 => {
            Name => 'NewEXIFTag',
            Writable => 'int16u',
            WriteGroup => 'IFD0',
        },
        0xd001 => {
            Name => 'ClientRequest',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
        0xd002 => {
            Name => 'CMImageType',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
        0xd003 => {
            Name => 'CMBuyingGroup',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
        0xd004 => {
            Name => 'CMBuyingInterest',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
        0xd005 => {
            Name => 'People',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
        0xd006 => {
            Name => 'AgeSubject',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
        0xd007 => {
            Name => 'Diversity',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
        0xd008 => {
            Name => 'Ethnicity',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
        0xd009 => {
            Name => 'Gender',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
        0xd00a => {
            Name => 'BusinessSpecs',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
        0xd00b => {
            Name => 'SubjectStyle',
            Writable => 'string',
            WriteGroup => 'IFD0',
        },
    },
);
1; #end


- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

AlexSuarez

THANK YOU!!  works like a charm now.

I'm sure you get this alot, this really is an awesome tool. 
truely do appreciate you taking the time to answer/keep up with your forum.