title: I keep getting this error in python3 "TypeError: an integer is required (got type str)"
body: <p>so basically i have been working on a project that makes a login and signup system with python3 using tkinter
  ive come to the point where i have to save the things inputed into a file with <strong><em>open()</em></strong>
  but it keeps giving me this error</p>
  
  <pre><code>    File "C:\Users\Kirill Rodionov\AppData\Local\atom\app-1.45.0\login.py", line 19, in storeData
      passwordFile = open("Passwords.txt", "a")
  TypeError: an integer is required (got type str)
  </code></pre>
  
  <p>this is my code</p>
  
  <pre><code>from tkinter import *
  from os import *
  
  nameFile = open("Names.txt", O_APPEND)
  passwordFile = open("Passwords.txt", O_APPEND)
  
  def SignUp():
  
      def storeData():
  
          name = signupNameEntry.get()
          password = signupPasswordEntry.get()
          rpassword = signupRPasswordEntry.get()
  
          print(name)
          print(password)
          print(rpassword)
          print(type(name))
          print(type(password))
  
          if password == rpassword:
              print("passwords match")
              nameFile = open("Names.txt", "a")
              passwordFile = open("Passwords.txt", "a")
              passwordFile.write(password)
              nameFile.write(name)
              passwordFile.close()
              nameFile.close()
  
          else:
              print("passwords don't match")
  
  
      signup = Toplevel()
      signup.title("Sign Up")
  
      Label(signup, text="Name", pady=5, padx=5).grid(row=1, column=1)
      Label(signup, text="Password", pady=5, padx=5).grid(row=2, column=1)
      Label(signup, text="Repeat\nPassword").grid(row=3, column=1)
      signupNameEntry = Entry(signup)
      signupNameEntry.grid(row=1, column=2)
      signupPasswordEntry = Entry(signup)
      signupPasswordEntry.grid(row=2, column=2)
      signupRPasswordEntry = Entry(signup)
      signupRPasswordEntry.grid(row=3, column=2)
      signupButton = Button(signup, text="Sign Up", command=storeData, pady=5, padx=5).grid(row=4, column=2)
  
      signup.mainloop()
  </code></pre>
  
  <p>the other part is the main loop i hope you get the code is the main loop i cant post the whole code because it says "your post is mostly code" 
  btw im new to stackoverflow</p>