Tkinter-Designer
Tkinter-Designer copied to clipboard
Report bug :_tkinter.TclError: couldn't recognize data in image file
- Briefly describe the bug when I execute gui.py, I got _tkinter.TclError: couldn't recognize data in image file "/Users/Zhou/Project/Tkinter-Designer/gui/assets/TextBox_Bg.png"
- Operating System mscos, python 3.10.6 , tcl 8.5
- Please provide step by step instructions on how to reproduce the bug
Traceback (most recent call last): File "/Users/Zhou/Project/Tkinter-Designer/gui/gui.py", line 118, in <module> text_box_bg = tk.PhotoImage(file=ASSETS_PATH / "TextBox_Bg.png") File "/Users/Zhou/.pyenv/versions/3.10.6/lib/python3.10/tkinter/__init__.py", line 4093, in __init__ Image.__init__(self, 'photo', name, cnf, master, **kw) File "/Users/Zhou/.pyenv/versions/3.10.6/lib/python3.10/tkinter/__init__.py", line 4038, in __init__ self.tk.call(('image', 'create', imgtype, name,) + options) _tkinter.TclError: couldn't recognize data in image file "/Users/Zhou/Project/Tkinter-Designer/gui/assets/TextBox_Bg.png"
thanks
Can u try using a different image ?
Tcl/Tk 8.5 doesn't support png images
I don't think that's the issue @rdbende , TkinterDesigner itself uses Png files
@ParthJadhav Based on the error message he tries to run TkinterDesigner itself.
Same issue here.