Picovector text oddness

I have a Pico 2 with a Pico Display Pack 2.8. Using pico2-v1.29.0-2-pimoroni-micropython.uf2 I have a very simple micropython script that displays two lines of text.

The first time I run it after powering on the board it works.

The second time I run it, five characters are missing (k, u, 5, 6 & ’ ')

The third time I run it nothing displays (black screen).

The time interval between successive runs does not affect behaviour.

All occurrences of those five characters disappear. However, If I change the string displayed the characters lost change:

‘abcdefghijklmnopqrstuvwxyz’ becomes '‘abcdefghijlmnopqrstvwxyz’

‘the quick brown fox jumps’ becomes ‘thequickbrownfoxjmps’, i.e. I lose the u and the spaces, but the k survives.

‘ku56 ku56 ku56’ becomes ‘kukuku’ so both k and u survive.

After any of the runs if I power-cycle the pico and display the process restarts at the first run, with a correctly working pass of the script. For any given string, the same characters are lost on the second run, and the third run is always blank (black) screen.

Googling reveals that missing characters is blamed on suspect font af file encoding, but I got mine from Releases · pimoroni/picovector-fonts · GitHub v1.1.1. Googling says a PicoVector script running once fine and failing the second time is a known fault with arc function solved in firmware at the start of 2025, and I’m using pico2-v1.29.0-2-pimoroni-micropython.uf2 from two days ago. I can’t find my observed behaviour (fault on 2nd run, fail on 3rd run) reported elsewhere.

Does anyone have any suggestions?

The script:

from picographics import PicoGraphics, DISPLAY_PICO_DISPLAY_2, PEN_P8
from picovector import PicoVector

display = PicoGraphics(display=DISPLAY_PICO_DISPLAY_2, pen_type=PEN_P8)
vector = PicoVector(display)

display.set_backlight(0.7)

wht_pen = display.create_pen(255,255,255)   # white
grn_pen = display.create_pen(0,200,0)       # green

vector.set_font("OpenSans-Regular.af",24)

display.set_pen(wht_pen)
display.clear()

display.set_pen(grn_pen)
vector.text("abcdefghijklmnopqrstuvwxyz", 10,50)
vector.text("0123456789", 10,90)

display.update()

The first run:

The second run:

The third run:

This is literally just clicking the ‘run current script’ icon in Thonny three times.

I have one of these pico display screens attached to a pico2 not doing anything in my drawer so I loaded on the Pimoroni pico2 v1.29.0-2 on 2026-08-31 and tried your program.

I can confirm similar problems, though not identical. It ran OK for the first 5 or 6 times I ran the program but eventually got:

Traceback (most recent call last):
File “”, line 4, in
MemoryError: memory allocation failed, allocating 76800 bytes

Also one subsequent try I got some other squiggly lines on the screen.

So this was just to confirm you are not alone with this issue. I’ve no time to do any more tests at the moment, but perhaps you should email Pimoroni support to report the issue.

Try

from picographics import PicoGraphics, DISPLAY_PICO_DISPLAY_2, PEN_P8
from picovector import PicoVector

display = PicoGraphics(display=DISPLAY_PICO_DISPLAY_2, pen_type=PEN_P8)
vector = PicoVector(display)

display.set_backlight(0.7)

wht_pen = display.create_pen(255,255,255)   # white
grn_pen = display.create_pen(0,200,0)       # green
blk_pen = display.create_pen(0,0,0)       # black

vector.set_font("OpenSans-Regular.af",24)

display.set_pen(blk_pen)
display.clear()

display.set_pen(wht_pen)
display.clear()
display.set_pen(grn_pen)
vector.text("abcdefghijklmnopqrstuvwxyz", 10,50)
vector.text("0123456789", 10,90)

display.update()


display.set_pen(blk_pen)
display.clear()

should fill the display buffer with all zero’s, efectivly empty.
is there a “display.fill()” option?

Behaves almost the same, but on the third run I don’t get a black screen, but the Pico hangs before it gets as far as updating the screen so I just see what’s left over after teh second run.

I changed the first few lines to:

from picographics import PicoGraphics, DISPLAY_PICO_DISPLAY_2, PEN_P8
from picovector import PicoVector

display = PicoGraphics(display=DISPLAY_PICO_DISPLAY_2, pen_type=PEN_P8)
vector = PicoVector(display)

print("screentesting2.py",0.1)

display.set_backlight(0.7)

and it doesn’t get as far as the print - so now it hangs in one of those first four lines, but without blanking the screen. If I go back and put a print into my original script at the same place it likewise doesn’t do the print, both both versions of the code are hanging / freezing / whatever in either the imports (unlikely) or the display = ... or vector = ... lines.

When it gets stuck there the ‘STOP’ button in Thonny doesn’t work (says ‘Unable to connect to COM3:’ etc) so I have to either pull power or short ‘run’ pin to ground. I guess the fix is just to do that every time regardless.

I’m going to have a look see in my boxes of stuff for a Display Pack 2. Once i hunt one up I’ll test some code on it and get back to you.

I went here Release Version 1.29.0 · pimoroni/pimoroni-pico-rp2350 · GitHub
and downloaded rpi_pico2-v1.29.0-micropython.uf2 is that the one you used?

It looks like I’m missing a font? Line 12 is
vector.set_font("OpenSans-Regular.af",24)
which gets me.

MPY: soft reboot
Traceback (most recent call last):
  File "<stdin>", line 12, in <module>
OSError: [Errno 2] ENOENT

@alphanumeric get your fonts here:

When I look at the source behind vector, I can see that vector.set_font() deallocates memory for the last font (if any), otherwise the memory is never freed. There are other data-structures within PicoVector that are explicitly freed at destructor time, so this could be the cause of the MemoryError you see.

Got it, and now I’m seeing what your seeing.

You might want to post this as an issue on thier GitHub page?