Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

kcauto does not start on macOS #401

Open
cplusx opened this issue Dec 3, 2019 · 5 comments
Open

kcauto does not start on macOS #401

cplusx opened this issue Dec 3, 2019 · 5 comments

Comments

@cplusx
Copy link

cplusx commented Dec 3, 2019

  • kcauto version (version on first line of CHANGELOG.md):v8.0.0-rc1
  • Operating system and/or VM: MacOS catalina

Is the issue consistent (can be reproduced consistently) or is it intermittent (only happens sometimes)?: Yes

Please provide a thorough description of the issue. Screenshots, videos, or at least a step-by-step description of what is happening in the game is typically necessary to debug.
line self.tk.call(_flatten((self._w, cmd)) + self._options(cnf)) pops error _tkinter.TclError: unknown option "-relief".
My python is 3.7.5, tkinter version 3.6.8

Log

python3 kcauto -cli
[2019-12-02 21:08:31] Initializing kcauto vv8.0.0-rc1 GUI.
[2019-12-02 21:08:31] Starting kcauto GUI.
Traceback (most recent call last):
  File "/Users/jiaxincheng/anaconda3/envs/kcauto/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Users/jiaxincheng/anaconda3/envs/kcauto/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "kcauto/__main__.py", line 29, in <module>
    gui_main()
  File "kcauto/kcauto_gui.py", line 59, in gui_main
    update_gui(window, event, values)
  File "kcauto/kcauto_gui.py", line 173, in update_gui
    LayoutBase.update_widgets(window)
  File "kcauto/gui/layout_base.py", line 181, in update_widgets
    window[element].Widget.configure(relief='flat')
  File "/Users/jiaxincheng/anaconda3/envs/kcauto/lib/python3.7/tkinter/__init__.py", line 1485, in configure
    return self._configure('configure', cnf, kw)
  File "/Users/jiaxincheng/anaconda3/envs/kcauto/lib/python3.7/tkinter/__init__.py", line 1476, in _configure
    self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
_tkinter.TclError: unknown option "-relief"
@perryhuynh
Copy link
Owner

Likely due to You are running on OSX, and that OS has strict guidelines for the appearance of buttons. You can't change the relief on buttons on OSX.

Source: https://stackoverflow.com/a/45035271

@mrmin123
Copy link
Collaborator

mrmin123 commented Dec 3, 2019

kcauto is largely untested on OSX. That said, for your current issue you can remove the two lines here:

https://github.com/mrmin123/kcauto/blob/master/kcauto/gui/layout_base.py#L180-L181

and run it again.

@mrmin123 mrmin123 changed the title Crush when script start kcauto does not start on macOS Dec 3, 2019
@cplusx
Copy link
Author

cplusx commented Dec 3, 2019

The relief issue is solved, but got another tkinter error
_tkinter.TclError: unknown option "-fg"
Do you have any idea about which file should I locate?
I searched for keyword, there is no explicit assignment of fg=xxx

@perryhuynh
Copy link
Owner

the CLI should run without issues, the flag is --cli you were missing a -

as for the -fg option, theres multiple usages of it in config_tab_buttons.py and gui_tab_buttons.py

In order to get it running on OSX you may need to also install pyobjc

@PySimpleGUI
Copy link

Note that PySimpleGUI Buttons recently changed for the Mac. They are no longer tk.Button but instead ttk.Button. You can force them to be either one but for the Mac the default is ttk buttons. If using the .Widget extension of PySimpleGUI then you'll likely run into problems if originally used the settings using tk.Button parameters.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants