TomSchimansky / TomSchimansky/CustomTkinter
Problem in theme_manager with an executable
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.6k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
I'm coding an app with the package and when I want to start the script as an executable file (I use pyinstaller), I get this error:
*Traceback (most recent call last):
File "main.py", line 1, in <module>
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "customtkinter\__init__.py", line 20, in <module>
# import widgets
File "customtkinter\theme_manager.py", line 25, in load_theme
cls.theme["text"] = cls.theme["text"]["Windows"]
KeyError: 'text'
I don't understand why I got this because, in my other projects wich use this module too, I didn't get this error
I saw that another person got this too, but I already have the latest version of the module, and the error doesn't appear when I start the script in my IDE but only with an exe file
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with customtkinter/theme_manager.py at load_theme, then compare how the theme data is loaded when the application runs normally versus when it is packaged with PyInstaller. Reproduce the executable launch and verify that the packaged application starts without the KeyError for the missing text entry.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100