Why does StringVar().get() return a blank value in python? Why does StringVar().get() return a blank value in python? tkinter tkinter

Why does StringVar().get() return a blank value in python?


This is a popup, isn't it? You have another tk window open somewhere, right? If so, the quick fix is to provide StringVar with the correct master:

AddClassMemberWindow = Tk()ChildNameEntryVariable = StringVar(AddClassMemberWindow)

The proper fix is to remember never to use Tk() more than once in a program. If you need more windows, use the Toplevel widget to make them.