I just wrote a simple script that asks a user for their username and password. It will then store the data to a data base. However, when I pull out the data (user wants to login) it shows the error: TypeError: expected string or bytes-like object.
I tried reformatting the password, but nothing helps. It does show me that the error is here:
line 27, in pull_from_db
check_hash(password, hashed)
line 11, in check_hash
if bcrypt.checkpw(password.encode('utf-8'), hashed):
This is the script.