I am trying , like this : from tkinter import * from io import BytesIO window= Tk() db=MySQLdb.connect("localhost","root","??","??") cursor=db.cursor() sql= "SELECT LOGO FROM SYSTEMDETAILS" cursor.execute(sql) logo=cursor.fetchone() img = Image.open(BytesIO(logo)) phimg = ImageTk.PhotoImage(img) panel = Label(window, image = phimg) panel.pack() When i run this, it show error in line 9 , it want logo as an object but in here its tuple