maethor / avatar-generator

Generates default avatars from a given string (such as username).
54 stars 26 forks source link

Getting IO Error while trying the lib #3

Closed r1prakash closed 11 months ago

r1prakash commented 5 years ago

File "", line 1, in File "/home/administrator/.v27/lib/python2.7/site-packages/avatar_generator/init.py", line 42, in generate font = cls._font(render_size) File "/home/administrator/.v27/lib/python2.7/site-packages/avatar_generator/init.py", line 79, in _font return ImageFont.truetype(path, size=int(0.8 * size)) File "/home/administrator/.v27/lib/python2.7/site-packages/PIL/ImageFont.py", line 280, in truetype return FreeTypeFont(font, size, index, encoding, layout_engine) File "/home/administrator/.v27/lib/python2.7/site-packages/PIL/ImageFont.py", line 145, in init layout_engine=layout_engine) IOError: cannot open resource

dodoru commented 5 years ago

I have just tried this package on MacOS. And it raise the same Exception.

I found the reason is package lack of data/Inconsolata.otf .

So, I am trying to create a pull request to fix it now.

Franky1 commented 1 year ago
  1. Tried it on windows, problem still exists, there has been no upgrade of the pypi package yet, the font is still missing.
  2. Also Pillow must be pinned down to pillow<10
xals commented 11 months ago

Should be fixed now.