phatch-dev team mailing list archive
-
phatch-dev team
-
Mailing list archive
-
Message #00957
[Bug 521682] Re: IPTC tags applied incorrectly
I was able to reproduce this.
This seems to be a problem with the pyexiv2 library, could you check
what version are you using? In ubuntu you could just search "pyexiv2" in
synaptic and it will show you. I'm using 0.1.3-3build1.
Basically pyexiv2 does something strange with Iptc tags. Some of them
are repeatable so it read the iptc values as tuples, if they are not
tuples it converts them to tuple.
The interesting part is on lines 657 and 658 of pyexiv2.py where if the
tuple has just one item it replaces the tuple with the item. The problem
is that if that item is a string (and this is the case) on line 659 it
use a for loop and this cause the "char by char" splitting.
Solutions:
- Comment line 657 and 658 works.
It doesn't seem a good solution, maybe there is some lib misunderstanding, or it's just a bug on pyexiv2, but anyway it is pyexiv2's code, not phatch's.
- Replacing "info[tag] = value" at line 49 on actions/write_tag.py with "info[tag] = (value, '')" seems an hack even worse than the previous one but almost work :)
I'm going to ask pyexiv2 guys how it should work.
Andrea
--
IPTC tags applied incorrectly
https://bugs.launchpad.net/bugs/521682
You received this bug notification because you are a member of Phatch
Developers, which is subscribed to Phatch.
Status in Phatch = Photo & Batch!: New
Bug description:
I'm attaching two screenshots:
- the first one shows what I'm trying to do: set the copyright field to "test", and apply a "phatch" tag to the keywords field.
- the second picture shows the result:
1) only the first letter of the tag is inserted in the copyright field,
2) regarding the "keywords" field, the word "phatch" is interpreted as 6 keywords, one for each letter.
Also, since the "keywords" field allows more than one entry, Phatch should ask whether to add to or replace the existing tags.
References