Hi, i am making the pihole on a zero with the little oled screen. When i run
sudo python stats.py
i get
Traceback (most recent call last):
File "stats.py", line 70, in <module>
font = ImageFont.truetype("/home/pi/slkscr.ttf", 8)
File "/usr/lib/python2.7/dist-packages/PIL/ImageFont.py", line 238, in truetype
return FreeTypeFont(font, size, index, encoding)
File "/usr/lib/python2.7/dist-packages/PIL/ImageFont.py", line 127, in __init__
self.font = core.getfont(font, size, index, encoding)
IOError: cannot open resource
what have i done wrong?
when i run
sudo i2cdetect -y 1
i get
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
thanks
S
pi hole oled screen
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_carter
- Posts: 29170
- Joined: Tue Nov 29, 2016 2:45 pm
Re: pi hole oled screen
It looks like you missed the step to install additional fonts:
https://learn.adafruit.com/pi-hole-ad-b ... ed-support
Scroll down a little until you see:
https://github.com/adafruit/Adafruit_Py ... s/stats.py
https://learn.adafruit.com/pi-hole-ad-b ... ed-support
Scroll down a little until you see:
You could also try running the original version of stats.py as a sanity check:First thing I did is update the font so its a little clearer. I used Kottke's free Silkscreen font which looks great on small screens.
https://github.com/adafruit/Adafruit_Py ... s/stats.py
- illumeo
- Posts: 10
- Joined: Sat Jan 30, 2016 11:01 am
Re: pi hole oled screen
Hi,
I got the /example/stats.py working
did install the fonts but will check that i have not done something silly like putting stuff the in the wrong dir.
Thanks
I got the /example/stats.py working
did install the fonts but will check that i have not done something silly like putting stuff the in the wrong dir.
Thanks
- adafruit_support_carter
- Posts: 29170
- Joined: Tue Nov 29, 2016 2:45 pm
Re: pi hole oled screen
Excellent. So we know the basic hardware works.I got the /example/stats.py working
Good idea. The guide isn't super clear on that, but the location is hardwired into the code:...will check that i have not done something silly like putting stuff the in the wrong dir.
Code: Select all
font = ImageFont.truetype("/home/pi/slkscr.ttf", 8)
- illumeo
- Posts: 10
- Joined: Sat Jan 30, 2016 11:01 am
Re: pi hole oled screen
Top!
Thanks very much, that was it!
all working.
cheers
S
Thanks very much, that was it!
all working.
cheers
S
Please be positive and constructive with your questions and comments.