Comment 7 for bug 824440

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

Indeed it’s starting to look good!

It looks like the 'filename' argument passed to libexiv2python._Image(…) is of type 'bytes' in python3, whereas I would expect it to be of type 'str'.

Does applying the following patch improve things?

=== modified file 'src/pyexiv2/metadata.py'
--- src/pyexiv2/metadata.py 2011-08-17 16:35:49 +0000
+++ src/pyexiv2/metadata.py 2011-09-16 11:08:32 +0000
@@ -76,7 +76,7 @@
         stat = os.stat(filename)
         self._atime = stat.st_atime
         self._mtime = stat.st_mtime
- return libexiv2python._Image(filename)
+ return libexiv2python._Image(str(filename))

     @classmethod
     def from_buffer(cls, buffer):