As far as I can see from the image, there seems to be an error in img=tkinter.PhotoImage(file="image/webpy.jpg")
on line 11.
Now refer to the documentation for the tkinter
package.
PhotoImage for images in PGM, PPM, GIF and PNG formats. The later is supported starting with Tk 8.6.
https://docs.python.org/ja/3/library/tkinter.html#images
Therefore, an error may have occurred because you have specified an image file in JPG format that is not supported.Therefore, instead of JPG images,
You should be able to view it by preparing an image file in one of the formats in and specifying it instead of "image/webpy.jpg"
.
© 2023 OneMinuteCode. All rights reserved.