TomSchimansky / CustomTkinter

A modern and customizable python UI-library based on Tkinter
MIT License
11.63k stars 1.09k forks source link

Themes bugging out #2535

Closed WolfJack24 closed 3 months ago

WolfJack24 commented 3 months ago

So i am creating a app and when i tried to run it

i keep getting this error:

_tkinter.TclError: unknown color name "gray92 gray14"

so i changed the default theme to contain hex codes rather then color names:

_tkinter.TclError: unknown color name "{#EBEBEB} #242424"

i still get the same thing

here is the code:

from customtkinter import (
    # Imports
    set_default_color_theme as color_theme,
)

# Rest of code

def main() -> None:
    color_theme("./assets/theme/blue_in_hex.json")
    # Rest of code

blue_in_hex.json

WolfJack24 commented 3 months ago

if the whole of the main file is needed i will upload it

dipeshSam commented 3 months ago

Does the Code Snippet you provided also throw same error?

Regards.

WolfJack24 commented 3 months ago

Yes it does

dipeshSam commented 3 months ago

In my testing, it isn't showing any error.

WolfJack24 commented 3 months ago

Huh that is weird

but i have uploaded the project to github so ig that makes something easier: https://github.com/WolfJack24/Morse-Code-Translator

WolfJack24 commented 3 months ago

I figured it out, it was because i was modifying the default list object

here is the code that broke it:


import builtins

class List(list):
    def delisttify(self) -> str:
        string = ""
        if self:
            for item in self:
                string += f"{item} "
        return string

builtins.list = List