pyexiv2 can not open files with accents in filename on windows
Bug #332419 reported by
Rob Wallace
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyexiv2 |
Fix Released
|
High
|
Olivier Tilloy |
Bug Description
Code To produce bug:
# -*- coding: UTF-8 -*-
import pyexiv2
filename = u'û.jpg'
image = pyexiv2.
image.readMetad
print image.getComment()
Expected result:
Image JPEG comment printed
Actual Result:
Traceback (most recent call last):
File "accent_test.py", line 7, in <module>
image = pyexiv2.
File "C:\Python25\
libpyexiv2.
IOError: ├╗.jpg: Failed to open the data source: No such file or directory (2)
Fix:
Instead of using utf-8 encoding for the filename use the system file system coding as per the attached patch, this has been tested on both Windows and Linux.
Related branches
Changed in pyexiv2: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Thanks for the patch Rob, I'll make sure it lands into 0.2.