title: AttributeError: 'tuple' object has no attribute python error
body: <p>I have tried to run this code over and over and cannot figure out the problem. When you add a name the results can be displayed just fine. When I edit the name and then try to display the roster I get an error. The error is: </p>
  
  <pre><code>Traceback (most recent call last):
    File "Z:/Grantham University/programming essentials/Week 5 Cody Pillsbury.py", 
  line 88, in &lt;module&gt;
  
  DisplayTeamRoster(teamRoster)
    File "Z:/Grantham University/programming essentials/Week 5 Cody Pillsbury.py", 
  line 39, in DisplayTeamRoster
     teamRoster[x].displayTeamRoster()
  AttributeError: 'tuple' object has no attribute 'displayTeamRoster'
  </code></pre>
  
  <p>Below is the code: </p>
  
  <pre><code>import sys;
  
  class Roster:
      name = ""
      phoneNumber = ""
      jersyNumber = 0
      def __init__(self, name, phoneNumber, jersyNumber):
          self.name = name
          self.phoneNumber = phoneNumber
          self.jersyNumber = jersyNumber
  
      def setname(self, name):
          self.name = name
      def setphoneNumber(self, phoneNumber):
          self.phoneNumber = phoneNumber
      def setjersyNumber(self, jersyNumber):
          self.jersyNumber = jersyNumber
  
      def getname(self):
          return self.name
      def getphoneNumber(self):
          return self.phoneNumber
      def getjersyNumber(self):
          return self.jersyNumber
  
      def displayTeamRoster(self):
          print("Member information:")
          print("-------------------")
          print("Name:", self.name)
          print("Phone Number:", self.phoneNumber)
          print("Jersy Number:", self.jersyNumber)
  
  
  def DisplayTeamRoster(teamRoster):
          if len(teamRoster) == 0:
              print("There are no players on this team!")
          else:
              for x in teamRoster.keys():
                  teamRoster[x].displayTeamRoster()
  def addPlayer(teamRoster):
          playerName = input("Please Enter Player\'s Name:")
          playerPhoneNumber = input("Please Enter Player\'s Phone Number:")
          playerJersyNumber = int(input("Please Enter Player\'s Jersy Number:"))
  
          teamRoster[playerName] = Roster(playerName, playerPhoneNumber, playerJersyNumber)
          print(playerName, "is now on the Team Roster!")
          return teamRoster
  def removePlayer(teamRoster):
          removed = input("Please Enter Player You Would Like To Remove:")
          if removed in teamRoster:
                  del teamRoster[removed]
                  print(removed, "is no longer on in the team roster!")
          else:
                  print(removed, "was not found in the team roster!")
          return teamRoster
  def editPlayer(teamRoster):
          oldName = input("Please enter the player\'s name you would like to change:")
          if oldName in teamRoster:
              playerName = input("What is the player\'s new name:")
              playerPhoneNumber = input("What is the player\'s new phone number:")
              playerJersyNumber = input("What is the player\'s new jersey number:")
              teamRoster[oldName] = (playerName, playerPhoneNumber, playerJersyNumber)
          else:
              print(oldName, "was not found in the team roster!")
          return teamRoster
  def exitProgram():
          print("Exiting Program......")
          sys.exit()
  def mainApp():
          print("---------Main Menu---------")
          print("(1) Display Team Roster")
          print("(2) Add Player")
          print("(3) Remove Player")
          print("(4) Edit Player")
          print("(9) Exit Program")
  
          try:
              test = int(input("Please choose a menu option:"))
          except ValueError:
              print("invalid input, you must use corresponding number in menu")
          else:
              return test
  
  print("Welcome to the Team Manager")
  teamRoster = {}
  options = mainApp()
  while options != 9:
      if options == 1:
          DisplayTeamRoster(teamRoster)
      elif options == 2:
          teamRoster = addPlayer(teamRoster)
      elif options == 3:
          teamRoster = removePlayer(teamRoster)
      elif options == 4:
          teamRoster = editPlayer(teamRoster)
      elif options == 9:
          exitProgram()
      else:
          print("invalid selection")
      options = mainApp()
  </code></pre>