"can't write iptc:keywords value on this platform"

Started by dd-b, October 20, 2020, 11:02:52 PM

Previous topic - Next topic

dd-b

I'm running on Ubuntu 2020.04.1 LTS (Focal Fossa), using the perl libraries (installed from default Ubuntu packages). I also have the CLI installed from default Ubuntu packages, that's at version 11.88. I'm on actual hardware, an old Lenovo Ideapad (not a VM, I mean).

Using the exiftool application, I have written to "iptc:keywords" (either addressing it like that, or without specifying the group name so just "keywords") many times (and read it back; it's working). That should be invoking the same perl libraries my perl application gets. So that seems to me to be evidence that, in general, exiftool *can* write values to iptc:keywords on this platform. (Or does exiftool bundle it's own copy in, or install a separate copy somewhere, or something?)

Image::ExifTool::CanWrite(<filename>) returns true on the file in question, which is a jpeg file.

$ie->GetValue ('Error') does not give me any text. (nor does 'Warning'); I do think I'm checking for errors on individual calls, anyway.

How can I approach this? It seems to me unlikely that there's any broad general inability to write to iptc:keywords in a jpeg file on an Intel Linux platform!

Phil Harvey

Without seeing your code I can't help much.

Are you calling SetNewValue() followed by WriteInfo()?  What is the return value from each of these calls?

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

dd-b

Problem is fixed, thank you!

Dunno how I arrived at the previous state of my code; I was calling an Image::ExifTool method WriteValue() -- which today I can't find in the documentation.  No idea where I got the idea, or why I didn't get a clearer error (maybe I accidentally hit the name of an internal method? So it existed but wasn't the right thing?). (And the error was definitely coming from there; I initially thought it came from the WriteInfo() call later, but it did not.)

Works much better when I call SetNewValue().

Which just means I'm on to the *next* bugs (this is new code), but the next bug looks entirely like it's my fault, so.

There was clearly *something* weird going on, and the odds were hugely bigger that it was something dumb I did than something subtle in ExifTool; and indeed it was!

Phil Harvey

Quote from: dd-b on October 21, 2020, 03:05:17 PM
(maybe I accidentally hit the name of an internal method? So it existed but wasn't the right thing?).

Yup.

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