pyexiv2 can't rewrite his own values

Bug #507591 reported by VinsS
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyexiv2
New
Undecided
Unassigned

Bug Description

Script to re-create this bug

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
import pyexiv2

def read_infos():
    exd = {}
    ipd = {}
    obj = pyexiv2.Image("Alexa.jpg")
    obj.readMetadata()
    lk = obj.exifKeys()
    if lk:
        for k in lk:
            exd[k] = obj[k]
    else :
        exd = False
    lk = obj.iptcKeys()
    if lk:
        for k in lk:
            ipd[k] = obj[k]
    else :
        ipd = False
    print "Reading ok, writing ..."

    if exd:
        for k in exd.keys():
            try :
                obj[k] = exd[k]
            except ValueError, strerror:
                print strerror
                print "key:", k, "Value rejected:", exd[k], "\n"
    if ipd:
        for k in ipd.keys():
            try :
                obj[k] = ipd[k]
            except TypeError, strerror:
                print strerror
                print "key:", k, "Value rejected:", ipd[k], "\n"
    print "Done."

if __name__ == "__main__":
    import sys
    read_infos()

python2.6
pyexiv0.1.3
on Ubuntu 9.04
Image with metadata in attachement.

Revision history for this message
VinsS (vincent-vandevyvre) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :

Here is the output I get with the latest revision of the 0.1 branch on the provided file:

Reading ok, writing ...
invalid literal for int() with base 10: '(8, 8, 8)'
key: Exif.Image.BitsPerSample Value rejected: (8, 8, 8)

'int' object is not iterable
key: Iptc.Application2.RecordVersion Value rejected: 62211

Done.

Revision history for this message
Olivier Tilloy (osomon) wrote :

The first problem is bug #256875.
The second one is bug #343403.

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.