Strings must be encoded before checking, ошибка при проверки с хешированным паролем

Не могу понять почему возникает данная ошибка Код ниже:

email = input("Введите вашу почту ")
password = input("Введите ваш пароль ")
password = str.encode(password)
print(type(password))
print(password)
true_email = bd.cur.execute("SELECT email,password FROM users WHERE email=?",(email,)).fetchone()
hash_pass = true_email[1]
print(hash_pass)
print(type(hash_pass))
true_password = bcrypt.checkpw(password,hash_pass)
print(true_password)

Ответы (0 шт):