title: how to fix "TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'"
body: <p>I am trying to create a python file that will spam a directory with .txt files.</p>
  
  <p>I decided to start working with Tkinter but whenever I try to input a number I get this error message <code>"TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'"</code></p>
  
  <p>The code I am working with is:</p>
  
  <pre class="lang-py prettyprint-override"><code>from tkinter import *  
  
  top = Tk()  
  
  top.geometry("400x250")  
  
  Amount = Label(top, text = "Amount").place(x = 30,y = 50)  
  
  def spam():
      for i in range(int(e1)):
          print(i)
  
  sbmitbtn = Button(top, text = "Submit",activebackground = "pink", activeforeground = "blue",command=spam).place(x = 30, y = 170)  
  
  e1 = Entry(top).place(x = 80, y = 50)  
  
  
  
  top.mainloop()  
  </code></pre>
  
  <p>I've tired switching the 
  <code>for i in range(int(e1)):</code> to 
  <code>for i in range(str(e1)):</code> 
  but then I get the error message:  </p>
  
  <pre><code>"TypeError: 'str' object cannot be interpreted as an integer"
  </code></pre>
  
  <p>Any help is good help</p>