# Error Loading Images in Look Up Table

**URL:** <https://forum.allencell.org/t/error-loading-images-in-look-up-table/231>\
**Category:** Segmenter\
**Tags:** getting-started\
**Created:** [July 22, 2020, 6:33pm UTC](https://forum.allencell.org/t/error-loading-images-in-look-up-table/231 "2020-07-22T18:33:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AidanF](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@AidanF](https://forum.allencell.org/u/AidanF)\
**Post date:** [July 22, 2020, 6:33pm UTC](https://forum.allencell.org/t/error-loading-images-in-look-up-table/231/1 "2020-07-22T18:33:49Z")

</div>

Hi all,

I’ve run into loading images in the look up table demo. Here’s the code:

Loading the data

FILE\_NAME = ‘\Users\Desktop\AICSTest.tif’

reader = AICSImage(FILE\_NAME)

IMG = reader.data.astype(np.float32)

print(IMG.shape)

File “”, line 1  
FILE\_NAME = ‘\Users\Desktop\AICSTest.tif’  
^  
SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 0-1: truncated \UXXXXXXXX escape

I’ve also tried normalizing the string in a number of ways and I get a File Not Found error.

Loading the data

FILE\_NAME = r’\Users\Desktop\AICSTest.tif’

reader = AICSImage(FILE\_NAME)

IMG = reader.data.astype(np.float32)

​

print(IMG.shape)

* * *

FileNotFoundError Traceback (most recent call last)  
 in   
1 FILE\_NAME = r’\Users\Desktop\AICSTest.tif’  
----\> 2 reader = AICSImage(FILE\_NAME)  
3 IMG = reader.data.astype(np.float32)  
4  
5 print(IMG.shape)

Any one have any thoughts on this?

Thanks,  
Aidan

---

<div class="post-metadata">

**Author:** ![jianxu\_chen](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@jianxu\_chen](https://forum.allencell.org/u/jianxu_chen)\
**Post date:** [July 22, 2020, 6:51pm UTC](https://forum.allencell.org/t/error-loading-images-in-look-up-table/231/2 "2020-07-22T18:51:22Z")

</div>

can you remind me if you are using windows? or Mac?

---

<div class="post-metadata">

**Author:** ![AidanF](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@AidanF](https://forum.allencell.org/u/AidanF)\
**Post date:** [July 22, 2020, 7:28pm UTC](https://forum.allencell.org/t/error-loading-images-in-look-up-table/231/3 "2020-07-22T19:28:17Z")

</div>

Windows! Sorry for not clarifying.

Aidan

---

<div class="post-metadata">

**Author:** ![jianxu\_chen](https://avatars.discourse-cdn.com/v4/letter/j/85f322/32.png) [@jianxu\_chen](https://forum.allencell.org/u/jianxu_chen)\
**Post date:** [July 22, 2020, 7:47pm UTC](https://forum.allencell.org/t/error-loading-images-in-look-up-table/231/4 "2020-07-22T19:47:27Z")

</div>

a couple of things to check:

(1) make sure your file realy exists  
(2) your file path does not seem to be correct full path, should it be something like C://Users/…  
(3) you can also try a relative path, namely, copying your tiff file to the same directory as where you start your jupyter. then, use filename only to load the image

---

<div class="post-metadata">

**Author:** ![AidanF](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@AidanF](https://forum.allencell.org/u/AidanF)\
**Post date:** [July 22, 2020, 8:24pm UTC](https://forum.allencell.org/t/error-loading-images-in-look-up-table/231/5 "2020-07-22T20:24:51Z")

</div>

Hi Jianxu,

Option number 3 worked! I’m not sure why loading from my desktop didn’t work as the file definitely exists but this works for me!

Best,  
Aidan

---

<div class="post-metadata">

**Author:** ![danielt](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@danielt](https://forum.allencell.org/u/danielt)\
**Post date:** [July 22, 2020, 10:38pm UTC](https://forum.allencell.org/t/error-loading-images-in-look-up-table/231/6 "2020-07-22T22:38:17Z")

</div>

In a normal string, try doubling the backslashes in your paths. For example, ’\Users\Desktop\AICSTest.tif’ becomes ‘\\Users\\Desktop\\AICSTest.tif’. Python interprets a single backslash as an “escape” character and is trying to interpret “\U” as a special thing. Your “r” string would have worked but I believe was missing the C: drive designator, as Jianxu mentioned. You should then be able to load files from your desktop.

---

<div class="post-metadata">

**Author:** ![AidanF](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@AidanF](https://forum.allencell.org/u/AidanF)\
**Post date:** [July 22, 2020, 11:32pm UTC](https://forum.allencell.org/t/error-loading-images-in-look-up-table/231/7 "2020-07-22T23:32:19Z")

</div>

Thanks all for the responses. I managed to upload an image by loading the file into the jupyter path.

When I exported I used r’\C:\Users\elcid\DeskTop\test\_segmentation.tiff’ path which worked (a few other permutations did not).

Best,  
Aidan
