pyinat / naturtag

Tag your nature photos with iNat taxonomy and observation metadata
https://naturtag.readthedocs.io
MIT License
37 stars 4 forks source link

Fix for 'XMP Toolkit error 102: Composite nodes can't have values' #169

Closed JWCook closed 2 years ago

JWCook commented 2 years ago

Fix for the error:

XMP Toolkit error 102: Composite nodes can't have values

I narrowed this down to a file with Xmp.xmpMM.History with both a single value and an array (Xmp.xmpMM.History[1]). The array value was added by GIMP; not sure where the single value came from.

To fix this, and potentially the same issue with other tags, I added a check before writing XMP to remove any single-value keys if an array value also exists with the same key.

See also: