-
Hello. Is there a problem with loading custom themes from outside of the site-packages location? Not sure if I am doing something wrong, but I get this: Looking at this through the debugger, I see this: I verify that this is the location of my JSON: Also I see that by the time we get to the Thememanager code we see this: So it looks as though it's trying to open a file, without the full pathname and so fails. Thanks, Clive |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@avalon60 I am not getting any error while loading external themes, I directly use this method for loading it: You have to specify the full path including the .json extension. If you want to add the theme in site packages, then first paste the my_theme.json file inside the Like this: Then you can use it directly like this: I don't know if it will help or not... |
Beta Was this translation helpful? Give feedback.
@avalon60 I am not getting any error while loading external themes,
I directly use this method for loading it:
customtkinter.set_default_color_theme("themepath/my_theme.json")
You have to specify the full path including the .json extension.
If you want to add the theme in site packages, then first paste the my_theme.json file inside the
customtkinter>assets>themes
folder and then add the new theme name in this list of theme_manager.Like this:
built_in_themes = ["blue", "green", "dark-blue", "sweetkind", "my_theme"]
No need to add the .json file extension.
Then you can use it directly like this:
customtkinter.set_default_color_theme("my_theme")
I don't know if it will help or not...