Safe-and-Stable-Ckpt2Safetensors-Conversion-Tool-GUI icon indicating copy to clipboard operation
Safe-and-Stable-Ckpt2Safetensors-Conversion-Tool-GUI copied to clipboard

Failed to run on macos

Open Songkeys opened this issue 1 year ago • 2 comments

environment: macos m1 python 3.9

python3 run_app_gui.py
/Users/songkeys/Library/Python/3.9/lib/python/site-packages/PySimpleGUI/PySimpleGUI.py:24845: UserWarning: You are running a VERY old version of tkinter 8.5.9. You cannot use PNG formatted images for example.  Please upgrade to 8.6.x
  warnings.warn('You are running a VERY old version of tkinter {}. You cannot use PNG formatted images for example.  Please upgrade to 8.6.x'.format(tclversion_detailed), UserWarning)
Mac OS Version is 13.2 and patch enabled so applying the patch
Applyting Mac OS 12.3+ Alpha Channel fix.  Your default Alpha Channel is now 0.99
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/songkeys/Downloads/convertor/run_app_gui.py", line 309, in <module>
    main()
  File "/Users/songkeys/Downloads/convertor/run_app_gui.py", line 93, in main
    window = sg.Window(APP_TITLE,layout,finalize=True, resizable=True,enable_close_attempted_event=False,background_color=color.GRAY_9900)
  File "/Users/songkeys/Library/Python/3.9/lib/python/site-packages/PySimpleGUI/PySimpleGUI.py", line 9614, in __init__
    self.Finalize()
  File "/Users/songkeys/Library/Python/3.9/lib/python/site-packages/PySimpleGUI/PySimpleGUI.py", line 10300, in finalize
    self.Read(timeout=1)
  File "/Users/songkeys/Library/Python/3.9/lib/python/site-packages/PySimpleGUI/PySimpleGUI.py", line 10075, in read
    results = self._read(timeout=timeout, timeout_key=timeout_key)
  File "/Users/songkeys/Library/Python/3.9/lib/python/site-packages/PySimpleGUI/PySimpleGUI.py", line 10146, in _read
    self._Show()
  File "/Users/songkeys/Library/Python/3.9/lib/python/site-packages/PySimpleGUI/PySimpleGUI.py", line 9886, in _Show
    StartupTK(self)
  File "/Users/songkeys/Library/Python/3.9/lib/python/site-packages/PySimpleGUI/PySimpleGUI.py", line 16866, in StartupTK
    _convert_window_to_tk(window)
  File "/Users/songkeys/Library/Python/3.9/lib/python/site-packages/PySimpleGUI/PySimpleGUI.py", line 16753, in _convert_window_to_tk
    PackFormIntoFrame(window, master, window)
  File "/Users/songkeys/Library/Python/3.9/lib/python/site-packages/PySimpleGUI/PySimpleGUI.py", line 15991, in PackFormIntoFrame
    PackFormIntoFrame(element, labeled_frame, toplevel_form)
  File "/Users/songkeys/Library/Python/3.9/lib/python/site-packages/PySimpleGUI/PySimpleGUI.py", line 15991, in PackFormIntoFrame
    PackFormIntoFrame(element, labeled_frame, toplevel_form)
  File "/Users/songkeys/Library/Python/3.9/lib/python/site-packages/PySimpleGUI/PySimpleGUI.py", line 15216, in PackFormIntoFrame
    photo = tk.PhotoImage(data=element.ImageData)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 4064, in __init__
    Image.__init__(self, 'photo', name, cnf, master, **kw)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 4009, in __init__
    self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: couldn't recognize image data

I tried python3.9 run_app_gui.py, it's another error:

python3.9 run_app_gui.py
Traceback (most recent call last):
  File "/Users/songkeys/Downloads/convertor/run_app_gui.py", line 1, in <module>
    import PySimpleGUI as sg
  File "/Users/songkeys/Library/Python/3.9/lib/python/site-packages/PySimpleGUI/__init__.py", line 2, in <module>
    from .PySimpleGUI import *
  File "/Users/songkeys/Library/Python/3.9/lib/python/site-packages/PySimpleGUI/PySimpleGUI.py", line 136, in <module>
    import tkinter as tk
  File "/opt/homebrew/Cellar/[email protected]/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 37, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'

I have run both pip install -r requirements.txt and pip3 install -r requirements.txt.

Songkeys avatar Mar 06 '23 10:03 Songkeys