Power & Source of Big Ideas

Nanohat OLED crashing

Moderators: chensy, FATechsupport

Hello,

I am using the default script from https://github.com/friendlyarm/NanoHatOLED with my nanopi neo2. Running the bakebit script:

Code: Select all

~/NanoHatOLED/BakeBit/Software/Python$ python bakebit_nanohat_oled.py

Everything works fine until I try to get to the second page. Once I press K2, the output is:

Code: Select all

K2 pressed
Traceback (most recent call last):
  File "bakebit_nanohat_oled.py", line 286, in <module>
    time.sleep(1)
  File "bakebit_nanohat_oled.py", line 240, in receive_signal
    draw_page()
  File "bakebit_nanohat_oled.py", line 156, in draw_page
    draw.text((x, top+5),       "IP: " + str(IP),  font=smartFont, fill=255)
  File "/usr/local/lib/python2.7/dist-packages/PIL/ImageDraw.py", line 209, in text
    *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/PIL/ImageDraw.py", line 233, in multiline_text
    line_width, line_height = self.textsize(line, font)
  File "/usr/local/lib/python2.7/dist-packages/PIL/ImageDraw.py", line 260, in textsize
    return font.getsize(text, direction, features)
  File "/usr/local/lib/python2.7/dist-packages/PIL/ImageFont.py", line 156, in getsize
    size, offset = self.font.getsize(text, direction, features)
SystemError: error return without exception set

Has anyone run into this? Thanks
You need to install it first, execute the following command in the Ubuntu core system:

# cd NanoHatOLED
# sudo -H ./install.sh
lawrence wrote:
You need to install it first, execute the following command in the Ubuntu core system:

# cd NanoHatOLED
# sudo -H ./install.sh


I've already done that. The screen works fine until it tries to go to page 2 of the display
I'm sorry, it's an issue. Now you can fix it this way:

cd ~/NanoHatOLED/BakeBit/
sudo git checkout master
sudo git pull
sudo reboot

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 42 on 15 Jul 2016, 01:04

Users browsing this forum: No registered users and 1 guest