"type error" for Nikon images with chr(128) values in EXIF tags
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyexiv2 |
New
|
Undecided
|
Unassigned |
Bug Description
Upgrade to 12.04 Precise and pyexiv2 package is brittle (fails on unicoded EXIF tags for Nikon images). Still looking into it. The error could be my fault (bad upgrade or pyexiv2 package download) but...
Attempting apply str() to a Nikon UserCommen exif tag gives:
Traceback (most recent call last):
File "/home/
tagim.
File "/home/
print "{0}: {1}".format(
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-217: ordinal not in range(128)
hobs@hobs-laptop:~$ gedit src/tagim/tagim.py
The problematic Nikon tag contains Japanese characters in unicode
Exif.Photo.
Attempting to unicode() all tags gets past the Japanese unicode but fails on the XMP tags in the same Nikon image:
Traceback (most recent call last):
File "/home/
tagim.
File "/home/
print "{0}: {1}".format(
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
TypeError: expected string or buffer
Thanks for the report Hobson.
Could you please attach or send me an image that contains such a tag that reproduces the issue?