rdbende / Azure-ttk-theme

A stunning modern theme for ttk inspired by Fluent Design 💠
MIT License
739 stars 136 forks source link

TclError: couldn't read file "azure-dark.tcl": no such file or directory #12

Closed Jerryno closed 3 years ago

Jerryno commented 3 years ago

The downloaded example.py throws this error:

root.tk.call('source', 'azure-dark.tcl')
_tkinter.TclError: couldn't read file "azure-dark.tcl": no such file or directory

azure

Win 10, Python 3.9.0

rdbende commented 3 years ago

no such file or directory

I can only imagine that the workingdirectory of your program has changed, try it with an absolute path!

It works just fine on Ubuntu 20.04, Python 3.8

Jerryno commented 3 years ago

Yeah the working directory is different. This is what fixed it for me:

dir_path = os.path.dirname(os.path.realpath(__file__))
root.tk.call('source', os.path.join(dir_path, 'azure-dark.tcl'))