With Python Interpreter it works fine, image loads and main.py runs without problems, but when I make it into one file .exe with Pyinstaller, .exe crashes with the following error message.
FileNotFoundError: 'themes.json' resource not found in 'ttkboostrap'
Any help would be sincerely appreciated.
Had the same issue.
Head over to where your
ttkbootstrap
is installed, copythemes.json
andSymbola.ttf
(if required) to the same folder as yourmain.py
andmain.spec
.Then modify your
main.spec
withdatas=[('themes.json', 'ttkbootstrap'), ('Symbola.ttf', 'ttkbootstrap')]
undera = Analysis()
.Symbola.ttf
may not be required for you but I encountered another FileNotFoundError after copyingthemes.json
over to the folder, which required me to bring overSymbola.ttf
as well.Once done, run
pyinstaller main.spec
on elevated command prompt.