Using new Inky Phat Yellow.
It’s running on a 4GB Pi4 using Buster
Calendar = OK
Weather = OK
Name badge though, does nothing. No errors, no Inky display change. Nothing. Nada. Zilch.
My thought was perhaps the fonts haven’t installed, but the code isn’t failing on the code import step.
Any ideas, please?
(Also tried again later on Pi Zero W, with the same results.)
Trying again on a daisy fresh OS.
There’re are still lots of error messages - e.g.
python-wikiquotes is required
Installing python-wikiquotes...
E: Unable to locate package python-wikiquotes
Apt failed to install python-wikiquotes!
Falling back on pypi...
pi@raspberrypi:~/Pimoroni/inky/examples $ python name-badge.py --type "phat" --colour "yellow" --name "Inigo Montoya"
Inky pHAT/wHAT: Hello... my name is:
Use Inky pHAT/wHAT as a personalised name badge!
pi@raspberrypi:~/Pimoroni/inky/examples $
Sorry to see that, it’ll be changes to Raspbian as it’s upgraded that’ll be causing errors, I’ll give our team a heads up.
It looks like it’s the correct library for the new version, but we’d need to see the full output of the install script to know which packages they were installed. I’d recommend trying both:
sudo pip install inky
and
sudo pip3 install inky
so you can try both python 2.7 and python 3 to see if that makes a difference.
Also please could you confirm you have the SPI interface enabled in raspi-config?
pi@raspberrypi:~ $ cd /home/pi/Pimoroni/inky/examples
pi@raspberrypi:~/Pimoroni/inky/examples $ python3 name-badge.py --type "phat" --colour "yellow" --name "Inigo Montoya"
Inky pHAT/wHAT: Hello... my name is:
Use Inky pHAT/wHAT as a personalised name badge!
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/inky/eeprom.py", line 100, in read_eeprom
from smbus2 import SMBus
ModuleNotFoundError: No module named 'smbus2'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "name-badge.py", line 37, in <module>
inky_display = InkyPHAT(colour)
File "/usr/local/lib/python3.7/dist-packages/inky/phat.py", line 72, in __init__
v_flip=False)
File "/usr/local/lib/python3.7/dist-packages/inky/inky.py", line 86, in __init__
self.eeprom = eeprom.read_eeprom(i2c_bus=i2c_bus)
File "/usr/local/lib/python3.7/dist-packages/inky/eeprom.py", line 102, in read_eeprom
raise ImportError('This library requires the smbus2 module\nInstall with: sudo pip install smbus2')
ImportError: This library requires the smbus2 module
Install with: sudo pip install smbus2
pi@raspberrypi:~/Pimoroni/inky/examples $ sudo pip install smbus2
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: smbus2 in /usr/local/lib/python2.7/dist-packages (0.3.0)
pi@raspberrypi:~/Pimoroni/inky/examples $ python3 name-badge.py --type "phat" --colour "yellow" --name "Inigo Montoya"
Inky pHAT/wHAT: Hello... my name is:
Use Inky pHAT/wHAT as a personalised name badge!
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/inky/eeprom.py", line 100, in read_eeprom
from smbus2 import SMBus
ModuleNotFoundError: No module named 'smbus2'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "name-badge.py", line 37, in <module>
inky_display = InkyPHAT(colour)
File "/usr/local/lib/python3.7/dist-packages/inky/phat.py", line 72, in __init__
v_flip=False)
File "/usr/local/lib/python3.7/dist-packages/inky/inky.py", line 86, in __init__
self.eeprom = eeprom.read_eeprom(i2c_bus=i2c_bus)
File "/usr/local/lib/python3.7/dist-packages/inky/eeprom.py", line 102, in read_eeprom
raise ImportError('This library requires the smbus2 module\nInstall with: sudo pip install smbus2')
ImportError: This library requires the smbus2 module
Install with: sudo pip install smbus2
pi@raspberrypi:~/Pimoroni/inky/examples $
Which error messages Matt?
SMBUS installed OK, yes. (Calendar and Weather work OK remember!).
pip/pip3 doesn’t seem to have changed anything.
No, nothing from the name-badge commands.
We’re suspecting it’s different versions of Pythons used at the command line and in whichever Python utility you’re using (you’ve mentioned Thonny, are you also using IDLE3?)
Might be worth trying: sudo python3 -m pip install smbus2
That should install smbus2 specifically for the version of python3 that’s run when you use it at the Pi command line.
pi@raspberrypi:~ $ sudo python3 -m pip install smbus2
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: smbus2 in /usr/local/lib/python3.7/dist-packages (0.3.0)
Idle3 unavailable, so installed that.
pi@raspberrypi:~ $ sudo apt-get install idle3
Name badge doesn’t ask for the name, it just crashes.
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license()" for more information.
>>>
=========== RESTART: /home/pi/Pimoroni/inky/examples/name-badge.py ===========
Inky pHAT/wHAT: Hello... my name is:
Use Inky pHAT/wHAT as a personalised name badge!
usage: name-badge.py [-h] [--mock] [--type {auto,what,phat}]
[--colour {red,black,yellow}] --name NAME
name-badge.py: error: the following arguments are required: --name/-n
>>>
You’ll want to run it from the “Terminal” so that you can pass your name as a parameter. I don’t think you can pass parameters running the script from Idle3.
I’m having the same issue on my new pi. Just bought a new pi and an e-ink board. Just put it all together, but can’t get any example to run (except what the manufacturer included in their example bits)