0

I always used this as part of my tkinter app without any issues:

# STYLE settings
themefile = os.path.dirname(sys.argv[0])
s = Style(theme="finaltb", themes_file=f"{themefile}\\tbtheme.json")

s.configure("TEntry", relief="flat", borderwidth=1)
s.configure("TCombobox", relief="flat", borderwidth=1)

app = s.master
app.title("bla")
width = app.winfo_screenwidth()
height = app.winfo_screenheight()
app.geometry("1000x850")
app.minsize(1000, 850)
app.iconbitmap("logo5.ico")

After letting my program untouched for around 6 month now I get this error message when I try to run it:

Traceback (most recent call last):

File "....GUI.py", line 76, in <module>
s = Style(theme="finaltb", themes_file=f"{themefile}\\tbtheme.json")        

TypeError: Style.__new__() got an unexpected keyword argument 'themes_file'
exec85
  • 447
  • 1
  • 5
  • 21
  • In the [doc](https://ttkbootstrap.readthedocs.io/en/latest/api/style/style) I don't see any mention of `themes_file` as a keyword arg. You might want to use the method [load_user_themes](https://ttkbootstrap.readthedocs.io/en/latest/api/style/style/#ttkbootstrap.style.Style.load_user_themes) – Tranbi Jul 18 '23 at 12:36

0 Answers0