Warning: No writable tags found -- confusion

Started by nms, October 06, 2011, 08:59:23 AM

Previous topic - Next topic

buelensc

Thanks for the multiple answers.  I'll respond to each of those one by one.  First the longest response.

As for the conversion error. I tried to solve errors for a few flags listed in error messages:

Warning: Can't convert ExifIFD:Flash (not in PrintConv)

The help text suggested to use # to avoid conversion.  So I added a # to the tags for which the error was given.  The help file doesn't mention the value need to be numeric.  Hence my error to code -WhiteBalance#="AUTO        "

But, at the other hand, I'm surprised that what exiftool happily saves in a .txt file cannot be fed to exiftool without error.

For example: I code this to extract much exif info after uploading photos and having set GPS information with GeoSetter:

Ophalen van de exifs uit Z:\dias\OrgJpegs\2012\2012-01-12BE\20120323-Fri
Z:\FotoToolsEnz\exiftool-8.89\exiftool.exe  -s -n -p "filename=$filename}} -ExposureTime=$ExposureTime}} -Fnumber=$Fnumber}} -Exposur
eProgram=$ExposureProgram}} -ISO=$ISO}} -ExifVersion=$ExifVersion}} -DateTimeOriginal=$DateTimeOriginal}} -CreateDate=$CreateDate}} -
Exposurecompensation=$Exposurecompensation}} -Focusdistance=$Focusdistance}} -Flash=$Flash}} -Colorspace=$Colorspace}} -ExposureMode=
$ExposureMode}} -WhiteBalance=$WhiteBalance}} -Scenecapturetype=$Scenecapturetype}} -Contrast=$Contrast}} -Saturation=$Saturation}} -
Sharpness=$Sharpness}} -Make=$Make}} -Model=$Model}} -Aperturevalue=$Aperturevalue}} -Brightnessvalue=$Brightnessvalue}} -Subjectdist
ance=$Subjectdistance}} -FocalLength=$FocalLength}} -FocalLengthin35mmFormat=$FocalLengthin35mmFormat}} -Makernote:Lenstype=$Makernot
e:Lenstype}} -MeteringMode=$MeteringMode}} -Lens=$Lens}} -GPSLatitude=$GPSLatitude}} -GPSLongitude=$GPSLongitude}} -GPSLatitudeRef=$G
PSLatitudeRef}} -GPSLongitudeRef=$GPSLongitudeRef}} -GPSMapDatum=$GPSMapDatum}} -GPSDateStamp=$GPSDateStamp}} -GPSTimeStamp=$GPSTimeS
tamp}} -GPSLatitude=$GPSLatitude}} -GPSLongitude=$GPSLongitude}} -GPSDateTime=$GPSDateTime}} -Keywords=$Keywords}} -City=$City}} -Sub
-location=$Sub-location}} -Province-State=$Province-State}} -Country-PrimaryLocationCode=$Country-PrimaryLocationCode}} -Country-Prim
aryLocationName=$Country-PrimaryLocationName}} -ApplicationRecordVersion=$ApplicationRecordVersion}} -CountryCode=$CountryCode}} -Loc
ation=$Location}} -Subject=$Subject}} -Country=$Country}} -State=$State}} -comment=$comment}}" -q -q -f Z:\dias\OrgJpegs\2012\2012-01
-12BE\20120323-Fri\BE2012_8264.jpg -w! .gpsExif.txt


Note that I add the }} so I can parse the txt file for a tag and its value.  The result is thus a.txt file with amongst others:

ExposureMode=0}} -WhiteBalance=AUTO        }} -Scenecapturetype=0}}

When my REXX scripts reads the .txt file to set selected exif info to a copy of the original photo, initially it generated parameters like these

-ExposureMode="0"  -WhiteBalance="AUTO        "  -Scenecapturetype="0"

and that resulted in

Warning: Can't convert ExifIFD:ExposureProgram (not in PrintConv)
Warning: Can't convert ExifIFD:Flash (not in PrintConv)
Warning: Can't convert ExifIFD:ColorSpace (not in PrintConv)
Warning: Can't convert ExifIFD:ExposureMode (not in PrintConv)
Warning: Can't convert ExifIFD:WhiteBalance (not in PrintConv)
Warning: Can't convert ExifIFD:SceneCaptureType (not in PrintConv)
Warning: Can't convert ExifIFD:MeteringMode (not in PrintConv)

So for the 7 tags listed above, my REXX code inserted a # char.  And now I only this single error:

Warning: Not an integer for ExifIFD:WhiteBalance

I guess I can try to change my REXX script to code around it and change AUTO into a number, but, again, wouldn't it be better if  exiftool can set a tag to a value itself generated during extraction?

buelensc

Now about writing the keywords (into Keywords and Subject), is not what you want. In your case:
-Keywords="Bedoin, Frankrijk"
..will write Bedoin, Frankrijk as one keyword -not as two keywords (Bedoin and Frankrijk), as you probably expect.


I'm just rewriting what GeoSetter wrote (I guess) by coding
-Keywords=$Keywords}}
in the parameters used to extract the exifs into my .txt files.  So, would GeoSetter do it wrong than?  Or is there some other trick?

buelensc

And, the last response:

The "no writable tags" error occurs because you are copying DateTimeOriginal to the FileModifyDate with "-DateTimeOriginal>FileModifyDate".  With this syntax, -tagsFromFile @ is implied.

What I want to do with my REXX script is thus copy exif info from my .txt file into a copy of the photo that I edited with maybe various Photo editors.  As part of this step, I want to set the timestamp of that copy equal to the time the photo was taken.  And, it does indeed work.  The timestamp is set as I expect, it just is this error that annoys me:
Warning: No writable tags set from Z:/dias/onaf/2011-09-09FR/Af/FR2011_7452.jpg

How can I request Exiftool to do this while it sets the exif information? 
Or do I have to revert to a REXX tool set change the timestamp of after exiftool did its work?

Phil Harvey

How did you produce the .txt file?  ExifTool can read the .txt files that it produces.  If you produce a .txt file with the -args option, you can read it back again with the -@ option.

You can copy tags at the same time as assigning tags.  If you get the "no writable tags" warning with "-DateTimeOriginal>FileModifyDate" in the command, then DateTimeOriginal isn't available in the file.

- 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 ($).

buelensc

First the short, unanswered question: is there a way to have exiftool set the date of the file to the "DateTimeOriginal" when that tag is not present anymore in the jpg file being updated, without that "no writable tags" message?

I produced the .txt file by calling exiftool with arguments built by my REXX script.  This script contains the tags I want to extract.

When creating this REXX, my goal was also to be able to read the produced txt file with other REXX scripts, surely to get images descriptions and location.  And also to make it possible to create one big file with many photos and selected tags.  And, for example, I create a .CSV file for each subdirectory with photos.

Initially I tried to enclose the text-type tags with quotes, but that caused problems with for example cities that have a ' in their name.   So I changed it to use a delimiter ( }} after each tag value) instead of the quotes.
My call now is for example:

Z:\FotoToolsEnz\exiftool-8.89\exiftool.exe  -s -n -p "filename=$filename}} -ExposureTime=$ExposureTime}} -Fnumber=$Fnumber}} -Exposur
eProgram=$ExposureProgram}} -ISO=$ISO}} -ExifVersion=$ExifVersion}} -DateTimeOriginal=$DateTimeOriginal}} -CreateDate=$CreateDate}} -
Exposurecompensation=$Exposurecompensation}} -Focusdistance=$Focusdistance}} -Flash=$Flash}} -Colorspace=$Colorspace}} -ExposureMode=
$ExposureMode}} -WhiteBalance=$WhiteBalance#}} -Scenecapturetype=$Scenecapturetype}} -Contrast=$Contrast}} -Saturation=$Saturation}}
-Sharpness=$Sharpness}} -Make=$Make}} -Model=$Model}} -Aperturevalue=$Aperturevalue}} -Brightnessvalue=$Brightnessvalue}} -Subjectdis
tance=$Subjectdistance}} -FocalLength=$FocalLength}} -FocalLengthin35mmFormat=$FocalLengthin35mmFormat}} -Makernote:Lenstype=$Makerno
te:Lenstype}} -MeteringMode=$MeteringMode}} -Lens=$Lens}} -GPSLatitude=$GPSLatitude}} -GPSLongitude=$GPSLongitude}} -GPSLatitudeRef=$
GPSLatitudeRef}} -GPSLongitudeRef=$GPSLongitudeRef}} -GPSMapDatum=$GPSMapDatum}} -GPSDateStamp=$GPSDateStamp}} -GPSTimeStamp=$GPSTime
Stamp}} -GPSLatitude=$GPSLatitude}} -GPSLongitude=$GPSLongitude}} -GPSDateTime=$GPSDateTime}} -Keywords=$Keywords}} -City=$City}} -Su
b-location=$Sub-location}} -Province-State=$Province-State}} -Country-PrimaryLocationCode=$Country-PrimaryLocationCode}} -Country-Pri
maryLocationName=$Country-PrimaryLocationName}} -ApplicationRecordVersion=$ApplicationRecordVersion}} -CountryCode=$CountryCode}} -Lo
cation=$Location}} -Subject=$Subject}} -Country=$Country}} -State=$State}} -comment=$comment}}" -q -q -f T:\testBE*.jpg -w! .gpsExif.
txt


You just learned me I could change it all and use the -args format, but that means recoding my REXX scripts.

At this time, only the problem that Whitebalans is generated like this
    -WhiteBalance=AUTO        }}
and feeding the selected tags from the .txt file (with some changes) back to Exiftool yields

-overwrite_original -P -all= -comment="P: Eprave (Hansur-Lesse)" -ImageDescription="P: Eprave (Hansur-Lesse)" -Artist="Kris Buelens"
-Copyright="® Kris Buelens, 2012" -ExposureTime="0.003125"  -Fnumber="22"  -ExposureProgram#="4"  -ISO="200"  -ExifVersion="0221"  -D
ateTimeOriginal="2012:03:23 17:37:25"  -CreateDate="2012:03:23 17:37:25"  -Exposurecompensation="-1"  -Focusdistance="5.9566214352901
"  -Flash#="0"  -ColorSpace#="1"  -ExposureMode#="0"  -WhiteBalance#="AUTO        "  -SceneCaptureType#="0"  -Contrast="0"  -Saturati
on="0"  -Sharpness="0"  -Make="NIKON CORPORATION"  -Model="NIKON D300"  -FocalLength="18"  -FocalLengthin35mmFormat="27"  -MeteringMo
de#="5"  -Lens="18 200 3.5 5.6"  -GPSLatitude="50.1452812700083"  -GPSLongitude="5.166363720075"  -GPSLatitudeRef="N"  -GPSLongitudeR
ef="E"  -GPSMapDatum="WGS-84"  -GPSDateStamp="2012:03:23"  -GPSTimeStamp="17:37:25"  -GPSLatitude="50.1452812700083"  -GPSLongitude="
5.166363720075"  -GPSDateTime="2012:03:23 17:37:25Z"  -Keywords="Belgie, Hansur-Lesse"  -City="Hansur-Lesse"  -Sub-location="Eprave"
-Province-State="Wallonie"  -Country-PrimaryLocationCode="BEL"  -Country-PrimaryLocationName="Belgie"  -ApplicationRecordVersion="4"
  -CountryCode="BEL"  -Location="Eprave"  -Subject="Belgie, Hansur-Lesse"  -Country="Belgie"  -State="Wallonie" "T:\TistBE2012_8323.J
PG"
Warning: Not an integer for ExifIFD:WhiteBalance
    1 image files updated

Phil Harvey

Quote from: buelensc on April 24, 2012, 12:58:32 PM
First the short, unanswered question: is there a way to have exiftool set the date of the file to the "DateTimeOriginal" when that tag is not present anymore in the jpg file being updated

You can only copy this tag if it exists somewhere.  If you just don't like the warning, -q will suppress it.

QuoteAt this time, only the problem that Whitebalans is generated like this
    -WhiteBalance=AUTO        }}
and feeding the selected tags from the .txt file (with some changes) back to Exiftool yields
Warning: Not an integer for ExifIFD:WhiteBalance
    1 image files updated

Actually, you aure using -WhiteBalance#="AUTO        ".

This is because you are writing MakerNotes:WhiteBalance to EXIF:WhiteBalance.  The former is stored as a string, and the latter as an integer.

Without the #, you will get "Can't convert ExifIFD:WhiteBalance", which is unfortunate because EXIF:WhiteBalance actually has an "Auto" value, which would be the one to use.  However, the trailing spaces in the MakerNotes:WhiteBalance are preventing this from matching the EXIF "Auto" value.  I'll update version 8.90 to be able to deal with trailing spaces like this.

- 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 ($).

buelensc

My REXX code removes the trailing blanks and no longer adds a # for WhiteBalance and now all is fine.

But an update to exiftool as you propose would be welcome too.

Thanks for your prompt responses.

Kris Buelens, Belgium