Jun-13-2020, 05:00 PM
In the case of When I login with the incorrect username and password - I get an error.
what are the returned values from
What is db, what database package does it refer to, what does the documentation state it will return from the method fetchone when there are no records.
If it returns None you will get the error
what are the returned values from
usernamedata = db.execute("SELECT username FROM users WHERE username=:username", {"username":username}).fetchone() passworddata = db.execute("SELECT password FROM users WHERE username=:username", {"username":username}).fetchone()and what do you expect them to be.
What is db, what database package does it refer to, what does the documentation state it will return from the method fetchone when there are no records.
If it returns None you will get the error
usernamedata = None usernamedata[0]
Error:TypeError: 'NoneType' object is not subscriptable