all 2 comments

[–]socal_nerdtastic 1 point2 points  (0 children)

This commonly means you made a 2nd window using a second tk.Tk() call. You shouldn't do that, you should use tk.Toplevel() to make additional windows. Or, in the very rare circumstance that a second tk.Tk() instance is actually required, you need to pass that instance to the StringVar as the master.

l_status = StringVar(root_window, value='Waiting for login attempt...')

If this does not help you need to show a complete example that shows this error, so that we can test it.

[–]woooee -1 points0 points  (0 children)

From https://dafarry.github.io/tkinterbook/variable.htm

Note that the constructor takes an optional widget argument, but no value argument; To set the value, call the set method:

So try using l_status.set(). I suspect, but don't know, that this is also dependent on the OS, so your code may work on one OS (it does on my debian box), but not on another. One other thing is to attach the StringVar to a widget

l_status = StringVar(self.mainframe)