Gfx-hat contrast problems

The gfx-hat sample contrast-scanner.py gives the following error when launched with ‘python’:

Traceback (most recent call last):
File “contrast-scanner.py”, line 60, in
lcd.contrast(0)
AttributeError: ‘module’ object has no attribute ‘contrast’

When launched
with ‘python3’ gives the following error:

Traceback (most recent call last):
File “contrast-scanner.py”, line 21, in
font = ImageFont.truetype(fonts.Bitocra13Full, 13)
AttributeError: module ‘gfxhat.fonts’ has no attribute ‘Bitocra13Full’

Any Idea?

Hi
Same problem here, I juste bought a GFX-HAT and I installed the library on my RPi using:
curl https://get.pimoroni.com/gfxhat | bash

All the examples works except the contrast-scanner.py which gives me the same error as @ezio.soma .

If you look here, the contrast attribute is defined so is there is something wrong with the library installation ?

Btw I do not know where the GFX library is installed on my Pi, can anyone tell me ?

Thanks in advance.
M.

Hi
Are we the only ones with this problem ?
M.