0

How to fix '_tkinter.TclError: image "pyimage1" doesn't exist'

I'm learning how to use the tkinter module and i wrote this code to display an image as a label but it keeps giving me this error: '_tkinter.TclError: image "pyimage1" doesn't exist' Here's the code https://code.sololearn.com/cdeP0WsG5V9k/?ref=app

24th Oct 2021, 1:25 PM
Obinna
Obinna - avatar
2 ответов
+ 1
SoloLearn doesn't have access to your local files. Also tk doesn't work here on SoloLearn. And if run this on your computer outside of SoloLearn. Is the image in the same folder like your program?
24th Oct 2021, 1:35 PM
Stefanoo
Stefanoo - avatar
0
Sometimes "photoimage" doesn't works well. So I suggest you to use PIL library to work with images. (I don't know if there is another better option than this, this is from my experience)
7th Nov 2021, 8:55 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar