[GH-ISSUE #65] tkinter - couldn't recognize data in image file #59

Closed
opened 2026-02-25 20:34:33 +03:00 by kerem · 3 comments
Owner

Originally created by @Flatcova on GitHub (Sep 27, 2020).
Original GitHub issue: https://github.com/B16f00t/whapa/issues/65

hi, I just install the requirements and all but when I run the command this error comes up, I'm running python 3.8.2 on macOS

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 "whapa-gui.py", line 1049, in <module>
    Whapa(img_folder, icons)
  File "whapa-gui.py", line 54, in __init__
    self.iconlogo = PhotoImage(file=self.icons[0])
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/tkinter/__init__.py", line 4061, in __init__
    Image.__init__(self, 'photo', name, cnf, master, **kw)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/tkinter/__init__.py", line 4006, in __init__
    self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: couldn't recognize data in image file "/Volumes/windows 10/whapa/images/logo.png"
Originally created by @Flatcova on GitHub (Sep 27, 2020). Original GitHub issue: https://github.com/B16f00t/whapa/issues/65 hi, I just install the requirements and all but when I run the command this error comes up, I'm running python 3.8.2 on macOS ``` 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 "whapa-gui.py", line 1049, in <module> Whapa(img_folder, icons) File "whapa-gui.py", line 54, in __init__ self.iconlogo = PhotoImage(file=self.icons[0]) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/tkinter/__init__.py", line 4061, in __init__ Image.__init__(self, 'photo', name, cnf, master, **kw) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/tkinter/__init__.py", line 4006, in __init__ self.tk.call(('image', 'create', imgtype, name,) + options) _tkinter.TclError: couldn't recognize data in image file "/Volumes/windows 10/whapa/images/logo.png" ```
kerem closed this issue 2026-02-25 20:34:33 +03:00
Author
Owner

@B16f00t commented on GitHub (Sep 30, 2020):

Whapa only works in Windows and Linux. It has never tested in MacOs.

<!-- gh-comment-id:701302528 --> @B16f00t commented on GitHub (Sep 30, 2020): Whapa only works in Windows and Linux. It has never tested in MacOs.
Author
Owner

@grishka commented on GitHub (Jan 8, 2021):

Now it's been tested on macOS and it clearly didn't work. I'm getting the same error.

<!-- gh-comment-id:756745555 --> @grishka commented on GitHub (Jan 8, 2021): Now it's been tested on macOS and it clearly didn't work. I'm getting the same error.
Author
Owner

@Viveur commented on GitHub (Jan 14, 2021):

The version of Tkinker (8.5.9) that comes with Mac OS is old and buggy.

Downloads from python.org include a recent version of tkinker.

Note: Installing python from Brew will not symlink a new version of Tcl-tk. If you wish to install via the command line, try:
brew install pyenv
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc
env PYTHON_CONFIGURE_OPTS="--with-tcltk-includes='-I/usr/local/opt/tcl-tk/include' --with-tcltk-libs='-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6' --enable-shared" pyenv install 3.9.1 (replace 3.9.1 with the latest python version)

<!-- gh-comment-id:760394131 --> @Viveur commented on GitHub (Jan 14, 2021): The version of Tkinker (8.5.9) that comes with Mac OS is old and buggy. Downloads from python.org [include a recent version of tkinker](https://www.python.org/download/mac/tcltk/). Note: Installing python from Brew will not symlink a new version of Tcl-tk. If you wish to install via the command line, try: `brew install pyenv` `echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc` ```env PYTHON_CONFIGURE_OPTS="--with-tcltk-includes='-I/usr/local/opt/tcl-tk/include' --with-tcltk-libs='-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6' --enable-shared" pyenv install 3.9.1``` (replace 3.9.1 with the latest python version)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whapa#59
No description provided.