Enhance error message to diagnose issue #75

This commit is contained in:
Christoph Gohlke 2013-03-14 16:48:17 -07:00
parent 3d58d73eb5
commit 57dc4cc95f

View File

@ -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"]: