Posts: 1
Joined: Sat Jul 28, 2018 10:57 am

Waveshare E-paper - ImageFont Error

Sat Jul 28, 2018 11:05 am


I have been following the tutorial ... spberry_Pi to get started with the Waveshare 7.5inch E-paper display.

Hardware: RaspberryPiZeroW
OS: Raspbian Stretch (Headless)
Python Version: Python 2.7.13

I have followed the tutorial step-by-step but get the following error when running the demo code in /python

Code: Select all

[email protected]:~/epaper-install/raspberrypi/python $ sudo python
Traceback (most recent call last):
  File "", line 59, in <module>
  File "", line 43, in main
    font = ImageFont.truetype('/usr/share/fonts/truetype/freefont/FreeMonoBold.ttf', 24)
  File "/usr/lib/python2.7/dist-packages/PIL/", line 238, in truetype
    return FreeTypeFont(font, size, index, encoding)
  File "/usr/lib/python2.7/dist-packages/PIL/", line 127, in __init__
    self.font = core.getfont(font, size, index, encoding)
IOError: cannot open resource
Can someone explain what this means and how to rectify it please?

Many thanks,

Posts: 1
Joined: Thu May 30, 2019 11:28 pm

Re: Waveshare E-paper - ImageFont Error

Thu May 30, 2019 11:29 pm

I'm late to the party, as usual, but this will provide a fix ...

Return to “Graphics programming”