I just installed the Pillow package for my virtual user. Performing this action:
from PIL import Image, ImageFont, ImageDraw ImageFont.load_path('some_path')
I get an error message:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/net/isilonP/public/rw/homes/cbl_adm/.virtualenvs/chembl_webservices/lib/python2.7/site-packages/PIL/ImageFont.py", line 264, in load_path if not isinstance(filename, "utf-8"): TypeError: isinstance() arg 2 must be a class, type, or tuple of classes and types
And indeed, if you check out the official gihub repository ( https://github.com/python-imaging/Pillow/blob/master/PIL/ImageFont.py#L264 ), you can see this construct:
if not isinstance(filename, "utf-8"): ...
My question is: how to replace it with what really works?
source share