Exif.GPSInfo tags not accepting GPSCoordinate type

Bug #1067894 reported by Jim Easterbrook
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyexiv2
Confirmed
Medium
Unassigned

Bug Description

Here's a simple test script:

import pyexiv2

coord = pyexiv2.utils.GPSCoordinate(51, 35, 25.678, 'N')
md = pyexiv2.ImageMetadata('')
md['Exif.GPSInfo.GPSLatitude'] = coord

When I run this I get an exception:

Traceback (most recent call last):
  File "code/photini/test_gps.py", line 7, in <module>
    md['Exif.GPSInfo.GPSLatitude'] = coord
  File "/usr/lib/python2.7/dist-packages/pyexiv2/metadata.py", line 271, in __setitem__
    return getattr(self, '_set_%s_tag' % family)(key, tag_or_value)
  File "/usr/lib/python2.7/dist-packages/pyexiv2/metadata.py", line 219, in _set_exif_tag
    tag = ExifTag(key, tag_or_value)
  File "/usr/lib/python2.7/dist-packages/pyexiv2/exif.py", line 107, in __init__
    self._set_value(value)
  File "/usr/lib/python2.7/dist-packages/pyexiv2/exif.py", line 197, in _set_value
    self.raw_value = self._convert_to_string(value)
  File "/usr/lib/python2.7/dist-packages/pyexiv2/exif.py", line 431, in _convert_to_string
    raise ExifValueError(value, self.type)
pyexiv2.exif.ExifValueError: Invalid value for EXIF type [Rational]: [51,35,25N]

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

I can reliably reproduce with pyexiv2 0.3.2 (0.3.2-5ubuntu1 on Ubuntu 12.10).

Changed in pyexiv2:
importance: Undecided → Medium
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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