Each time I try to load an image onto my tkinter app, it refuses to load, rather it springs different errors.
I have used so many different versions of the code. Below is the latest, which still dosen't work but throws an error.
from PIL import Image, ImageTk # I have added the import of ImageTk
import tkinter
window = tkinter.Tk()
window.title("Join")
window.geometry("300x300")
window.configure(background='grey')
imageFile = '\User\PycharmProjects\BRIGHTBROWN\PyShop\tkinter\studentsRecord\myface.jpg'
im1 = ImageTk.PhotoImage(Image.open(imageFile))
panel = tkinter.Label(window, image = im1)
panel.pack(side = "bottom", fill = "both", expand = "yes")
window.mainloop()
The error thrown is:
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-1: truncated \UXXXXXXXX escape