1

so I'm resizing an image and adding it to a frame called playingSpace.Here's that piece of code :

# Opening up the image fileimg = Image.open("images/gameBoard_pic.jpg")# Resizing the image resized_im = img.resize((50,50))# Making the resized image into a photoimagefinal_img = ImageTk.PhotoImage(resized_im)# Adding the image to a label widetlabel = Label(playingSpace,image = final_img)# Putting the label widget on framelabel.pack()# Putting the frame on windowplayingSpace.pack()

2020欧洲杯手机版注册Now I keep on getting this error: _tkinter.TclError: image "pyimage7" doesn't exist.

2020欧洲杯手机版注册I've tried swapping in another image and I still get the same error.

New contributor
ri48329 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.Check out our Code of Conduct.

Your Answer

ri48329 is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.