Dec-14-2018, 02:57 PM
AttributeError: type object 'Image' has no attribute 'open'
this error message come when i run my code
HELP ME GUYS.i am new programmer to python.i can't understand what i do
code given below
this error message come when i run my code
HELP ME GUYS.i am new programmer to python.i can't understand what i do
code given below
from PIL import * import sqlite3 from tkinter import * connection = sqlite3.connect("school.db") tao = Tk() tao.title("Mayurapada Central Collage") tao.configure(bg = '#6699ff') canvas = Canvas(tao,width = 600,height = 400,bg = '#6699ff') def imgs(): img = Image.open("C:\\Users\\TAO\\Desktop\\New\\02.png") img.show() str01 = "Image" font = ImageFont.truetype("arial.ttf",75) w,h = font.getsize(str01) print(str01) button01 = Button(tao,text = "Preview",bd = 7,padx = 5,pady = 5,command = imgs).place(x = 50,y = 300) canvas.pack() tao.mainloop()