# Opening unicorn hd paint projects

**URL:** <https://forums.pimoroni.com/t/opening-unicorn-hd-paint-projects/7758>\
**Category:** Support\
**Created:** [May 19, 2018, 9:53pm UTC](https://forums.pimoroni.com/t/opening-unicorn-hd-paint-projects/7758 "2018-05-19T21:53:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Outpost31d](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/outpost31d/32/3503_2.png) [@Outpost31d](https://forums.pimoroni.com/u/Outpost31d)\
**Post date:** [May 19, 2018, 9:53pm UTC](https://forums.pimoroni.com/t/opening-unicorn-hd-paint-projects/7758/1 "2018-05-19T21:53:28Z")

</div>

When I try and reload a unicorn paint project in thonny I get a invalid syntax on the middle 0 on  
pixels [[[0 0 0] how can i display this file on the unicorn hat hd?

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [May 20, 2018, 10:45am UTC](https://forums.pimoroni.com/t/opening-unicorn-hd-paint-projects/7758/2 "2018-05-20T10:45:22Z")

</div>

Do you have an example of a project? It sounds like there might be a bug in the save function that’s causing commas to be missed from the pixels. It should be `[0, 0, 0]`

---

<div class="post-metadata">

**Author:** ![Outpost31d](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/outpost31d/32/3503_2.png) [@Outpost31d](https://forums.pimoroni.com/u/Outpost31d)\
**Post date:** [May 20, 2018, 2:01pm UTC](https://forums.pimoroni.com/t/opening-unicorn-hd-paint-projects/7758/3 "2018-05-20T14:01:34Z")

</div>

Sure thing, as well when I click the bucket next to the pencil it freezes the program

#!/usr/bin/env python  
import unicornhat, signal  
pixels = [[[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]]

[[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[207 157 111]  
[66 43 23]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]]

[[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 0 0]  
[132 0 0]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]]

[[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 0 0]  
[132 0 0]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]]

[[255 255 255]  
[255 255 255]  
[255 255 255]  
[0 0 0]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 0 0]  
[132 0 0]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]]

[[255 255 255]  
[0 0 0]  
[0 0 0]  
[0 0 0]  
[255 255 255]  
[255 255 255]  
[255 0 0]  
[132 0 0]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]]

[[0 0 0]  
[0 0 0]  
[0 0 0]  
[132 0 0]  
[193 129 70]  
[46 31 16]  
[46 31 16]  
[255 0 0]  
[132 0 0]  
[132 0 0]  
[66 43 23]  
[66 43 23]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]]

[[0 0 0]  
[132 0 0]  
[132 0 0]  
[0 0 0]  
[0 132 132]  
[193 129 70]  
[66 43 23]  
[46 31 16]  
[255 0 0]  
[255 0 0]  
[66 43 23]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]]

[[0 0 0]  
[132 0 0]  
[198 198 198]  
[0 0 0]  
[207 157 111]  
[207 157 111]  
[66 43 23]  
[66 43 23]  
[46 31 16]  
[255 0 0]  
[66 43 23]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]]

[[0 0 0]  
[132 0 0]  
[132 0 0]  
[0 0 0]  
[0 132 132]  
[207 157 111]  
[66 43 23]  
[66 43 23]  
[255 0 0]  
[255 0 0]  
[66 43 23]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]]

[[255 255 255]  
[0 0 0]  
[0 0 0]  
[132 0 0]  
[255 255 255]  
[255 255 255]  
[255 0 0]  
[132 0 0]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]]

[[255 255 255]  
[255 255 255]  
[255 255 255]  
[0 0 0]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 0 0]  
[132 0 0]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]]

[[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 0 0]  
[132 0 0]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]]

[[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 0 0]  
[132 0 0]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]]

[[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[207 157 111]  
[66 43 23]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]]

[[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]  
[255 255 255]]]  
unicornhat.set\_pixels(pixels)  
unicornhat.show()  
signal.pause()

---

<div class="post-metadata">

**Author:** ![Outpost31d](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/outpost31d/32/3503_2.png) [@Outpost31d](https://forums.pimoroni.com/u/Outpost31d)\
**Post date:** [May 22, 2018, 4:12am UTC](https://forums.pimoroni.com/t/opening-unicorn-hd-paint-projects/7758/4 "2018-05-22T04:12:57Z")

</div>

I notice in the terminal it saves with commas?  
(u’gg’, array([[[0, 0, 0],  
[0, 0, 0],  
[0, 0, 0],  
[0, 0, 0],  
[0, 0, 0],  
[0, 0, 0],  
[0, 0, 0],  
[0, 0, 0],  
[0, 0, 0],  
[0, 0, 0],  
[0, 0, 0],  
[0, 0, 0],  
[0, 0, 0],  
[0, 0, 0],  
[0, 0, 0],  
[0, 0, 0]],

```
   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]],

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]],

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]],

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]],

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [132, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]],

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [132, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]],

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [132, 0, 0],
    [132, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]],

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [132, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [132, 0, 0],
    [0, 0, 0],
    [132, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]],

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]],

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [132, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [132, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [132, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]],

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [132, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [132, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [132, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]],

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [132, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]],

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]],

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]],

   [[0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]]]))

```

127.0.0.1 - - [22/May/2018 04:08:33] “GET /save/gg?\_=1526962103615 HTTP/1.1” 200

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [May 24, 2018, 11:25am UTC](https://forums.pimoroni.com/t/opening-unicorn-hd-paint-projects/7758/5 "2018-05-24T11:25:42Z")

</div>

Yep, this is a bug that was fixed back in January, but because of the way our one-line-installer works it wont have pulled down the fixed version :(

You should replace your local paint.py with this one: [https://github.com/pimoroni/unicorn-hat-hd/blob/master/projects/unicornpaint/paint.py](https://github.com/pimoroni/unicorn-hat-hd/blob/master/projects/unicornpaint/paint.py)

You can fix your existing saves by adding in the missing commas- a good multi-cursor editor like VSCode should make that relatively painless.

Unicorn HAT HD uses a slightly different display routine. too:

```auto
import unicornhathd
import signal
unicornhathd.rotation(0)
pixels = [] # <--- Fixed save data should go here
for x in range(unicornhathd.WIDTH):
    for y in range(unicornhathd.HEIGHT):
        r, g, b = pixels[x][y]
        unicornhathd.set_pixel(x, y, r, g, b)
unicornhathd.show()
print("\nShowing: {}\nPress Ctrl+C to exit!")
signal.pause()

```

---

<div class="post-metadata">

**Author:** ![Outpost31d](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/outpost31d/32/3503_2.png) [@Outpost31d](https://forums.pimoroni.com/u/Outpost31d)\
**Post date:** [May 27, 2018, 1:37pm UTC](https://forums.pimoroni.com/t/opening-unicorn-hd-paint-projects/7758/6 "2018-05-27T13:37:51Z")

</div>

thanks so much for that, works now, as a side note the top right bin icon seems to crash the program, not sure why
