title: RadioButton tkinter : string indices must be integers
body: <p>I just want to create a class that shows and handles some <code>RadioButtons</code>.
  I'm new in <code>Tkinter</code> and I don't understand which is the problem.</p>
  <p>When I run it, the error says :</p>
  <pre><code> File &quot;/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/tkinter/__init__.py&quot;, line 2567, in _setup
      name = cnf['name']
  TypeError: string indices must be integers
  </code></pre>
  <p>I think I'm not handling in the right way data in &quot;modes&quot; but is just a feeling.
  This is the code:</p>
  <pre><code>from tkinter import Checkbutton, Radiobutton, StringVar, Tk, Label, IntVar
  
  class Enabler:
      b1: Radiobutton
      b2: Radiobutton
      v: StringVar
  
      def __init__(self, tk: Tk, r: int, c: int):
          Label(tk, &quot; username/email and password required?&quot;).grid(row=r, column=c)
          var = StringVar(tk, &quot;active&quot;)
          var.set(&quot;active&quot;)
          modes = [
              (&quot;Yes&quot;, &quot;active&quot;),
              (&quot;No&quot;, &quot;disabled&quot;)
          ]
          tmp_c: int = c
          for k, v in modes:
              Radiobutton(tk, text=k, value=v, variable=var,
                          command=self.getValue).grid(row=r, column=tmp_c)
              tmp_c += 1
  
      def getValue(self) -&gt; str:
          print(self.v.get())
          return self.v.get()
  
  
  tk = Tk()
  e = Enabler(tk, 0, 0)
  </code></pre>
  <p>I'm using python3.10</p>