From a26d7b6261cd2c31c8c459cc394b7a5d5f169e1a Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Wed, 13 Mar 2013 19:18:40 -0700 Subject: [PATCH] Decode bytestr instead of str --- PIL/TiffImagePlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PIL/TiffImagePlugin.py b/PIL/TiffImagePlugin.py index 7ec194043..bde52f8e4 100644 --- a/PIL/TiffImagePlugin.py +++ b/PIL/TiffImagePlugin.py @@ -630,7 +630,7 @@ class TiffImageFile(ImageFile.ImageFile): if Image.DEBUG: print ("have fileno, calling fileno version of the decoder.") self.fp.seek(0) - n,e = d.decode("fpfp") # 4 bytes, otherwise the trace might error out + n,e = d.decode(b"fpfp") # 4 bytes, otherwise the trace might error out elif hasattr(self.fp, "getvalue"): # We've got a stringio like thing passed in. Yay for all in memory. # The decoder needs the entire file in one shot, so there's not