Unable to add/modify multiple value short tags
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
IntiPunku |
Triaged
|
High
|
Mark Baas | ||
Phatch |
Triaged
|
Medium
|
Stani | ||
pyexiv2 |
Fix Released
|
Medium
|
Olivier Tilloy |
Bug Description
Steps to re-create bug
-------
>>> image = pyexiv2.
>>> image.readMetad
>>> image['
Expected outcome
-------
Exif data field added/modified:
Actual outcome
-------
The following exception is raised:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/
self.
File "/usr/lib64/
value = int(tagValue)
ValueError: invalid literal for int() with base 10: '(55, 18, 1)'
>>>
Changed in pyexiv2: | |
assignee: | nobody → osomon |
Changed in pyexiv2: | |
importance: | Undecided → Medium |
milestone: | none → 0.2 |
Changed in phatch: | |
assignee: | nobody → stani (stani) |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in phatch: | |
status: | Confirmed → Triaged |
Changed in intipunku: | |
importance: | Undecided → High |
Changed in pyexiv2: | |
status: | Fix Committed → Fix Released |
The bug is simply with pyexiv2 updating its internal cache after passing the new value down to the underlying exiv2 library (which occurs on line 594).
So as a short-term workaround if you call writeMetadata after the exception you'll see that the new value still ends up in your destination file.
I've attached a patch the fixes the problem with updating the cache using the same logic that is present in the __getExifTagValue to process the values coming from exiv2 originally.