DEV Community

loading...

image "pyimage14" doesn't exist

rakeshbyte profile image rakesh-byte ・1 min read

from tkinter import *
from PIL import Image, ImageTk

window = Tk()
name = Label(window, text = 'PythonX -Learn Python', bg = 'white', fg = 'blue', font=('Serif',16))
img = Image.open('OIP.png')
logo = ImageTk.PhotoImage(img)
image = Label(master = window , image=logo)
btn = Button(window, text = 'Submit')
username = Label(window, text = 'Username', font = ('serif',12))
inputBox = Entry(window)

name.pack()
image.pack()
username.pack(side=LEFT)
inputBox.pack(side=RIGHT)
btn.place(x=100, y=350)
window.mainloop()

this is my code and error which i am getting, is not answered before on google nor asked, kindly help!

Discussion (0)

pic
Editor guide