[Image-SIG] PIL throws exception when reading 8bit greyscale bitmap and pnm data

Fredrik Lundh fredrik at pythonware.com
Sat Dec 2 15:35:38 CET 2006


Fredrik Lundh wrote:

> can you try changing the except clause around line 153 from

here's an "official" patch:

Index: PIL/ImageFile.py
===================================================================
--- PIL/ImageFile.py    (revision 2929)
+++ PIL/ImageFile.py    (working copy)
@@ -149,7 +149,7 @@
                              self.map, self.size, d, e, o, a
                              )
                      readonly = 1
-                except (AttributeError, IOError, ImportError):
+                except (AttributeError, EnvironmentError, ImportError):
                      self.map = None

          self.load_prepare()



More information about the Image-SIG mailing list