Tkinter StringVar error Tkinter StringVar error tkinter tkinter

Tkinter StringVar error


You need to specify the tk.StringVar(), as you did for every other tk function you specified.

self.variable = tk.StringVar()

This is because you just did an import tk. As an alternative, you could import just the functions you need, or even all of them, by one of the two following lines:

from tk import StringVarfrom tk import *