Unable to copy metadata when source image contains multi-value short tags

Bug #256884 reported by Rob Wallace
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyexiv2
New
Undecided
Olivier Tilloy

Bug Description

This is related to bug 256875 "Unable to add/modify multiple value short tags"

Steps to re-create bug
-----------------------------
>>> import pyexiv2
>>> src = pyexiv2.Image("broken.jpg")
>>> src.readMetadata()
>>> dest = pyexiv2.Image("dest.jpg")
>>> dest.readMetadata()
>>> src.copyMetadataTo(dest)

Expected outcome
------------------------
Exif data copied from src to dest

Actual outcome
--------------------
The following exception is raised:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.5/site-packages/pyexiv2.py", line 750, in copyMetadataTo
    destImage[key] = self[key]
  File "/usr/lib64/python2.5/site-packages/pyexiv2.py", line 595, in __setitem__
    self.__exifTagsDict[key] = ConvertToPythonType(tagFamily,typeName, str(value))
  File "/usr/lib64/python2.5/site-packages/pyexiv2.py", line 355, in ConvertToPythonType
    value = int(tagValue)
    ValueError: invalid literal for int() with base 10: '(2,30, 907, 605)'

Example source file attached

Revision history for this message
Rob Wallace (anakhanz) wrote :
Olivier Tilloy (osomon)
Changed in pyexiv2:
assignee: nobody → osomon
Revision history for this message
Matt Brown (mattbrown) wrote :

This is actually exactly the same bug as 256875 as the copyMetadataTo routine just invokes the __setitem__ method. I've attached a patch to the other bug.

This report should probably be closed as a duplicate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.