ParthJadhav / Tkinter-Designer

An easy and fast way to create a Python GUI 🐍
BSD 3-Clause "New" or "Revised" License
9.27k stars 851 forks source link

Tkinter cannot open TextBox_Bg.png #419

Open JnrMert opened 5 months ago

JnrMert commented 5 months ago

How to Fix ?

  1. Error Message Tkinter-Designer/gui/gui.py DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning. Traceback (most recent call last): File "/Users/mertyazici/Tkinter-Designer/gui/gui.py", line 117, in text_box_bg = tk.PhotoImage(file=ASSETS_PATH / "TextBox_Bg.png") File "/Users/mertyazici/.pyenv/versions/3.9.1/lib/python3.9/tkinter/init.py", line 4062, in init Image.init(self, 'photo', name, cnf, master, **kw) File "/Users/mertyazici/.pyenv/versions/3.9.1/lib/python3.9/tkinter/init.py", line 4007, in init self.tk.call(('image', 'create', imgtype, name,) + options) _tkinter.TclError: couldn't recognize data in image file "/Users/***/Tkinter-Designer/gui/assets/TextBox_Bg.png"

  2. i double check TextBox_Bg can open with Pillow from PIL import Image