title: I'm getting this error in python: "AttributeError: 'str' object has no attribute 'set'". I'm using tkinter, how do I fix this?
body: <p>I'm making a simple rock-paper-scissors game and I'm getting an error in this line: result.set(&quot; &quot;). This line should clear an entry box when a button is clicked. How do I fix his issue?</p>
  <pre><code>result = StringVar()
  compRandom = random.randint(1, 3)
  compPick = compRandom.get()
  
  
  def reset():
      result.set(&quot;&quot;)
      userTake.set(&quot;&quot;)
  
  Entry(root, text=result, font='arial 10 bold', bg='turquoise2', width=50).place(x=25, y=250)
  Button(root, font='arial 13 bold', text='PLAY', padx=5, bg='cornflower blue', command=play).place(x=170, y=190)
  Button(root, font='arial 13 bold', text='RESET', padx=5, bg='cornflower blue', command=reset).place(x=90, y=310)
  Button(root, font='arial 13 bold', text='EXIT', padx=5, bg='cornflower blue', command=exit).place(x=250, y=310)
  
  root.mainloop()
  </code></pre>
  <p>The error code I'm getting is:</p>
  <pre><code>Exception in Tkinter callback
  Traceback (most recent call last):
    File &quot;C:\Program Files (x86)\Python37-32\lib\tkinter\__init__.py&quot;, line 1705, in __call__
      return self.func(*args)
    File &quot;C:/Users/57797/PycharmProjects/Tutorial/Tkinter GUI Tutorial/19 - Rock Paper Scissors.py&quot;, line 61, in reset
      result.set(&quot;&quot;)
  AttributeError: 'str' object has no attribute 'set'
  </code></pre>