PIL Issue, OSError: cannot open resource

前端 未结 7 1794
野的像风
野的像风 2020-12-31 04:12

I\'m attempting to write a program that places text onto an image, I\'m trying to get my head round PIL and have run into the error: OSError: cannot open resource. This is m

7条回答
  •  孤城傲影
    2020-12-31 04:28

    I have also met this issue on Windows 10 Pro with PIL 5.3.0.

    On my machine, the error is caused by non-ASCII font file names. If I change the the font name to only contain ASCII characters, I can open the font without any error.

    Edit (2019-07-29): this is indeed a bug with ImageFont.truetype() method and it has been fixed in this pull request.

提交回复
热议问题