I am trying to compare user input to an existing dictionary and keep getting value errors. I have repeatedly searched and changed the code but keep getting the same type of error. any ideas on how to solve this. I just want to verify that a username and password exist in the dictionary. Error I am getting:
File "C:\Users\jeff\Desktop\JAMGR\jeff\theCards.py", line 262, in login if NAME == users[NAME] and PASSWORD == users[PASSWORD]: KeyError: 'jeff001'
def login(entUsername, entPassword):
NAME = entUsername.get()
PASSWORD = entPassword.get()
#print(NAME, PASSWORD) this was to test the stored values (actually works)
userList()
if NAME == users[NAME] and PASSWORD == users[PASSWORD]:
cardCreator()
else:
existingUser()
'''Checks their credentials against the ones we have in the data base'''