Skip to content

Commit

Permalink
Better error messaging in PIL.image.fromarray
Browse files Browse the repository at this point in the history
  • Loading branch information
pwohlhart authored Oct 29, 2019
1 parent bb1fc75 commit 4769190
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -2633,7 +2633,7 @@ def fromarray(obj, mode=None):
typekey = (1, 1) + shape[2:], arr["typestr"]
mode, rawmode = _fromarray_typemap[typekey]
except KeyError:
raise TypeError("Cannot handle this data type")
raise TypeError("Cannot handle this data type: %s, %s" % typekey)
else:
rawmode = mode
if mode in ["1", "L", "I", "P", "F"]:
Expand Down

0 comments on commit 4769190

Please sign in to comment.