sortphotos icon indicating copy to clipboard operation
sortphotos copied to clipboard

TypeError: 'str' does not support the buffer interface

Open ciryon opened this issue 9 years ago • 3 comments

I get this error when trying to convert images.

Preprocessing with ExifTool.  May take a while for a large number of files.
Traceback (most recent call last):
  File "sortphotos.py", line 292, in sortPhotos
    metadata = e.get_metadata(*args)
  File "sortphotos.py", line 205, in get_metadata
    return json.loads(self.execute(*args))
  File "sortphotos.py", line 191, in execute
    self.process.stdin.write(str.join("\n", args))
TypeError: 'str' does not support the buffer interface

Any idea what's wrong? I'm using Windows 10 and Python 3.4.3.

ciryon avatar Jun 27 '15 20:06 ciryon

This is caused by some changes in how strings are handled in Python 3. For now I'd suggest using Python 2 if you can until I can find time to test in 3 as well.

andrewning avatar Jul 18 '15 02:07 andrewning

Hello I've corrected this bug in my fork that is currently in the pull request.

nekopep avatar Sep 17 '15 08:09 nekopep

nekopep - your fork work correctly also on Arch Linux and Python 3.50, without this I got similar error with the 'str' - thank you :)

souek avatar Oct 08 '15 18:10 souek