google / project-gameface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

customtkinter.CTkSwitch initialization missing fg_color argument

githubpsyche opened this issue · comments

self.toggle_switch = customtkinter.CTkSwitch(

Returns this error when I follow the Python app setup instructions.

'fg_color'
  File "C:\Users\gunnj\project-gameface\src\gui\frames\frame_cam_preview.py", line 68, in __init__
    self.toggle_switch = customtkinter.CTkSwitch(
  File "C:\Users\gunnj\project-gameface\src\gui\main_gui.py", line 62, in __init__
    self.frame_preview = frames.FrameCamPreview(self.tk_root,
  File "C:\Users\gunnj\project-gameface\run_app.py", line 35, in __init__
    super().__init__(tk_root)
  File "C:\Users\gunnj\project-gameface\run_app.py", line 66, in <module>
    main_app = MainApp(tk_root)
KeyError: 'fg_color'

Application fails to load as long as the error is maintained. Adding a fg_color argument and specifying an arbitrary color eliminates the error and allows the Application to run. (I am, however, still experiencing the issue described in #5 concerning cursor movement.)

Lowering customtkinter from version 5.1.3 to version 5.1.2 fixes the problem.👍

Lowering customtkinter from version 5.1.3 to version 5.1.2 fixes the problem.👍

How (for a noob) do I "lower customtkinter from version 5.1.3 to version 5.1.2"? Thank you!

Instead of downloading the program through the release section, you'd need to follow the Python application setup instructions. However, after the pip install -r requirements.txt step, you'd downgrade customtkinter via an additional command pip install customtinkier==5.1.2

NB: Upgrade customtkinter 5.2.0 and sort this stupid typo:

"fg_Color": ["#444746", "#4A4D50"],
thats the fix for this