LeoHsiao1 / pyexiv2

Read and write image metadata, including EXIF, IPTC, XMP, ICC Profile.
GNU General Public License v3.0
196 stars 39 forks source link

Failure to convert #96

Closed lipeck closed 2 years ago

lipeck commented 2 years ago

Getting a few error messages when working with metadata from .XMP files -- this is new behavior on scripts that haven't changed.

when reading Xmp.dc.description:

Failed to convert Xmp.dc.description to Iptc.Application2.Caption
Failed to convert Xmp.dc.description to Exif.Image.ImageDescription

2-3 or so images for every 100 get this error but I'm not sure why these images.

lipeck commented 2 years ago

I think I've noticed a pattern -- I believe this error appears when a description was previously filled but was cleared manually in an application like Bridge.

LeoHsiao1 commented 2 years ago

I guess the metadata format of the image is unusual. Could you try to read these special images directly with the exiv2 command? https://exiv2.org/manpage.html If it still prints an error, you can ask the Exiv2 team for help. And I found a similar problem: https://stackoverflow.com/questions/29579434/unable-to-parse-iptc-date-to-xmp-datetime-in-exiv2

lipeck commented 2 years ago

running exiv2 -pi on an affected image directly gave an output as expected and didn't print any errors. I went back and ran the same exact processes I ran yesterday and no errors were printed so this issue seems to have evaporated 🤷🏼‍♀️ thanks for being so responsive, i'll update if this seems to happen again.