From 57dc4cc95f846677150efd3cb316b9f14d38cf56 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Thu, 14 Mar 2013 16:48:17 -0700 Subject: [PATCH] Enhance error message to diagnose issue #75 --- PIL/Image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PIL/Image.py b/PIL/Image.py index 1e29db198..10f949778 100644 --- a/PIL/Image.py +++ b/PIL/Image.py @@ -1920,7 +1920,7 @@ def fromarray(obj, mode=None): mode, rawmode = _fromarray_typemap[typekey] except KeyError: # print typekey - raise TypeError("Cannot handle this data type") + raise TypeError("Cannot handle this data type %s" % repr(typekey)) else: rawmode = mode if mode in ["1", "L", "I", "P", "F"]: