mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-02 03:20:11 +03:00
Enhance error message to diagnose issue #75
This commit is contained in:
parent
3d58d73eb5
commit
57dc4cc95f
|
@ -1920,7 +1920,7 @@ def fromarray(obj, mode=None):
|
||||||
mode, rawmode = _fromarray_typemap[typekey]
|
mode, rawmode = _fromarray_typemap[typekey]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
# print typekey
|
# print typekey
|
||||||
raise TypeError("Cannot handle this data type")
|
raise TypeError("Cannot handle this data type %s" % repr(typekey))
|
||||||
else:
|
else:
|
||||||
rawmode = mode
|
rawmode = mode
|
||||||
if mode in ["1", "L", "I", "P", "F"]:
|
if mode in ["1", "L", "I", "P", "F"]:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user