# Inky Phat Name Badge does nothing

**URL:** <https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739>\
**Category:** Support\
**Created:** [August 15, 2020, 2:01pm UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739 "2020-08-15T14:01:09Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard238](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard238](https://forums.pimoroni.com/u/Richard238)\
**Post date:** [August 15, 2020, 2:01pm UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/1 "2020-08-15T14:01:09Z")

</div>

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.)

---

<div class="post-metadata">

**Author:** ![Richard238](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard238](https://forums.pimoroni.com/u/Richard238)\
**Post date:** [August 16, 2020, 3:37pm UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/2 "2020-08-16T15:37:28Z")

</div>

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...

```

Could any of that be the cause of the issue?

---

<div class="post-metadata">

**Author:** ![Richard238](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard238](https://forums.pimoroni.com/u/Richard238)\
**Post date:** [August 16, 2020, 3:41pm UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/3 "2020-08-16T15:41:19Z")

</div>

```
Traceback (most recent call last):
  File "name-badge.py", line 35, in <module>
    inky_display = InkyPHAT(colour)
  File "/usr/local/lib/python2.7/dist-packages/inky/phat.py", line 72, in __init__
    v_flip=False)
  File "/usr/local/lib/python2.7/dist-packages/inky/inky.py", line 86, in __init__
    self.eeprom = eeprom.read_eeprom(i2c_bus=i2c_bus)
  File "/usr/local/lib/python2.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 $ 

```

This isn’t very well tested prior to sale, is it?

---

<div class="post-metadata">

**Author:** ![Richard238](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard238](https://forums.pimoroni.com/u/Richard238)\
**Post date:** [August 16, 2020, 3:45pm UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/4 "2020-08-16T15:45:06Z")

</div>

```
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 $ 

```

**BUT STILL NO BADGE ON THE INKY PHAT!!!**

---

<div class="post-metadata">

**Author:** ![Richard238](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard238](https://forums.pimoroni.com/u/Richard238)\
**Post date:** [August 16, 2020, 3:55pm UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/5 "2020-08-16T15:55:46Z")

</div>

```
Some packages could not be installed, review the output for details!

pi@raspberrypi:~ $ 

```

Which packages?  
Is this why BADGE doesn’t work?

---

<div class="post-metadata">

**Author:** ![Matt](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/matt/32/1006_2.png) [@Matt](https://forums.pimoroni.com/u/Matt)\
**Post date:** [August 18, 2020, 12:10pm UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/6 "2020-08-18T12:10:35Z")

</div>

Hi Richard,

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?

Cheers,

Matt

---

<div class="post-metadata">

**Author:** ![Richard238](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard238](https://forums.pimoroni.com/u/Richard238)\
**Post date:** [August 18, 2020, 1:35pm UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/7 "2020-08-18T13:35:36Z")

</div>

Hi Matt,

How, why then do CALENDAR and WEATHER work?

SPI is enabled

```
pi@raspberrypi:~ $ sudo pip install inky
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: inky in /usr/local/lib/python2.7/dist-packages (1.0.1)
Requirement already satisfied: numpy in /usr/lib/python2.7/dist-packages (from inky) (1.16.2)
pi@raspberrypi:~ $

pi@raspberrypi:~ $ sudo pip3 install inky
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: inky in /usr/local/lib/python3.7/dist-packages (1.0.1)
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from inky) (1.16.2)
pi@raspberrypi:~ $ 

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 $ 

```

No change on Inky, still shows calendar. not name badge. :-(

---

<div class="post-metadata">

**Author:** ![Matt](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/matt/32/1006_2.png) [@Matt](https://forums.pimoroni.com/u/Matt)\
**Post date:** [August 19, 2020, 1:49pm UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/8 "2020-08-19T13:49:11Z")

</div>

Any difference if you try

`python3 name-badge.py`

---

<div class="post-metadata">

**Author:** ![Richard238](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard238](https://forums.pimoroni.com/u/Richard238)\
**Post date:** [August 19, 2020, 2:36pm UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/9 "2020-08-19T14:36:17Z")

</div>

```
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 $
```

---

<div class="post-metadata">

**Author:** ![Richard238](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard238](https://forums.pimoroni.com/u/Richard238)\
**Post date:** [August 19, 2020, 2:57pm UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/10 "2020-08-19T14:57:09Z")

</div>

Also tried

```
sudo pip3 install smbus2
python name-badge.py --type "phat" --colour "yellow" --name "Inigo Montoya"
python3 name-badge.py --type "phat" --colour "yellow" --name "Inigo Montoya"

```

Of course, no improvement. :(

---

<div class="post-metadata">

**Author:** ![Matt](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/matt/32/1006_2.png) [@Matt](https://forums.pimoroni.com/u/Matt)\
**Post date:** [August 20, 2020, 8:52am UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/11 "2020-08-20T08:52:30Z")

</div>

Any changes to the error messages at all?

Did smbus2 install properly? Does installing it with pip as well as pip3 help anything?

Any output from the name-badge commands?

---

<div class="post-metadata">

**Author:** ![Richard238](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard238](https://forums.pimoroni.com/u/Richard238)\
**Post date:** [August 20, 2020, 1:48pm UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/12 "2020-08-20T13:48:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Richard238](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard238](https://forums.pimoroni.com/u/Richard238)\
**Post date:** [August 21, 2020, 3:08pm UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/13 "2020-08-21T15:08:53Z")

</div>

In Thonny, open name-badge.py  
`Comment-out line 22, # parser.add_argument('--name', '-n', type=str, required=True, help="Your name")`

`Comment-out line 69, # name = args.name`

`Add new line 70, name = 'Hello World!'`

Execute code.  
Success!

Looks like it’s something to do with the `name string`, but quite what, I don’t know.

---

<div class="post-metadata">

**Author:** ![Matt](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/matt/32/1006_2.png) [@Matt](https://forums.pimoroni.com/u/Matt)\
**Post date:** [August 26, 2020, 10:30am UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/14 "2020-08-26T10:30:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Richard238](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard238](https://forums.pimoroni.com/u/Richard238)\
**Post date:** [August 27, 2020, 3:33pm UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/15 "2020-08-27T15:33:35Z")

</div>

> [@Matt](#):
>
> sudo python3 -m pip install smbus2

It’s already happy there with smbus2

```
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
>>>

```

---

<div class="post-metadata">

**Author:** ![major\_tomm](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/major_tomm/32/9044_2.png) [@major\_tomm](https://forums.pimoroni.com/u/major_tomm)\
**Post date:** [August 28, 2020, 4:38pm UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/16 "2020-08-28T16:38:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Richard238](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard238](https://forums.pimoroni.com/u/Richard238)\
**Post date:** [August 28, 2020, 5:02pm UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/17 "2020-08-28T17:02:36Z")

</div>

_Bangs head on wall, sobs quietly into first available cushion…_

That’s the first thing I tried Tomm. See first post in this thread.

---

<div class="post-metadata">

**Author:** ![major\_tomm](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/major_tomm/32/9044_2.png) [@major\_tomm](https://forums.pimoroni.com/u/major_tomm)\
**Post date:** [August 28, 2020, 6:30pm UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/18 "2020-08-28T18:30:55Z")

</div>

Apologies, joined the thread a bit late.

Is there any difference if you run the script with `python` or `python3`?

---

<div class="post-metadata">

**Author:** ![Richard238](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard238](https://forums.pimoroni.com/u/Richard238)\
**Post date:** [August 29, 2020, 11:46am UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/19 "2020-08-29T11:46:51Z")

</div>

No, tried that!  
See reply dated Aug 19th, 15:36

---

<div class="post-metadata">

**Author:** ![hakarune](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/hakarune/32/7151_2.png) [@hakarune](https://forums.pimoroni.com/u/hakarune)\
**Post date:** [September 15, 2020, 6:41am UTC](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739/20 "2020-09-15T06:41:50Z")

</div>

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)

[Next page](https://forums.pimoroni.com/t/inky-phat-name-badge-does-nothing/14739.md?page=2)
