AttributeError when trying to use tkFont AttributeError when trying to use tkFont tkinter tkinter

AttributeError when trying to use tkFont


If you look at the docs for tkFont, you'll see that the problem is that tkFont.Font requires a root argument - i.e. a parent widget. Fix this by moving the call to tkFont.Font below where you create the root window, then add self.root as a keyword argument, like so:

self.root = Tk()self.titleFont = tkFont.Font(root=self.root, family='Helvetica', size=24, weight='bold')                             ^^^^^^^^^^^^^^

You haven't gotten to this bug yet, but there are problems with the next line - I think you meant to write self.root.option_add rather than self.option_add, and I don't know what you're trying to do with the *Label*font business.