Python Tkinter Image Added

Python Tkinter GUI

Posted by indranil on Jan. 19, 2021, 11:04 p.m.

Python Tkinter Image Added:

I'm currently in the middle of a recorded Python lecture and I think the version of python the teacher is using is outdated and he is writing a tkinter program but after copying it I keep getting this error:

Traceback (most recent call last): File "C:\Users\1234\AppData\Local\Programs\Python\Python36-32\Lecture Class", line 35, in <module> photo = PhotoImage(file="Me With My 5th Place.jpg") File

Now Open Your Text Editor And Replace It To Fix Error: 

from tkinter import *
import tkinter as tk
from PIL import Image, ImageTk
#Create Display And Set Display Properties
display = Tk()
frame = display.geometry("644x434")
#Main Attachment For Showing Image
photo = ImageTk.PhotoImage("img.png"))
photo_label = Label(image=photo)
#Display Minimize Size


noimg Visit Link: