Tkinter-Designer icon indicating copy to clipboard operation
Tkinter-Designer copied to clipboard

Report bug :_tkinter.TclError: couldn't recognize data in image file

Open qyzxg opened this issue 3 years ago • 6 comments

  • 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

qyzxg avatar Aug 23 '22 23:08 qyzxg

Can u try using a different image ?

ParthJadhav avatar Sep 15 '22 17:09 ParthJadhav

Tcl/Tk 8.5 doesn't support png images

rdbende avatar Sep 24 '22 15:09 rdbende

I don't think that's the issue @rdbende , TkinterDesigner itself uses Png files

ParthJadhav avatar Nov 02 '22 04:11 ParthJadhav

@ParthJadhav Based on the error message he tries to run TkinterDesigner itself.

rdbende avatar Nov 02 '22 09:11 rdbende

Same issue here.

LucaJaich avatar Sep 29 '23 17:09 LucaJaich