---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/usr/local/lib/python3.7/site-packages/PIL/ImageDraw.py in Draw(im, mode)
465 try:
--> 466 return im.getdraw(mode)
467 except AttributeError:
AttributeError: 'numpy.ndarray' object has no attribute 'getdraw'
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last)
<ipython-input-16-3a0daa683956> in <module>
6
7 fnt = ImageFont.truetype('/Library/Fonts/Arial.ttf', 15)
----> 8 d = ImageDraw.Draw(mask)
9 d.text((10,10), "Hello world", font=fnt, fill=(255, 255, 0))
10
/usr/local/lib/python3.7/site-packages/PIL/ImageDraw.py in Draw(im, mode)
466 return im.getdraw(mode)
467 except AttributeError:
--> 468 return ImageDraw(im, mode)
469
470
/usr/local/lib/python3.7/site-packages/PIL/ImageDraw.py in __init__(self, im, mode)
58 defaults to the mode of the image.
59 """
---> 60 im.load()
61 if im.readonly:
62 im._copy() # make it writeable
AttributeError: 'numpy.ndarray' object has no attribute 'load'