Hi,
Looks like you’re using Python 3, whereas our sample code was for Python 2! This fix is simple - you need to call .encode()
on the password string before passing it into bcrypt
. Line 59 of ServerModule1
:
pwhash = bcrypt.hashpw(password, bcrypt.gensalt())
should be changed to this:
pwhash = bcrypt.hashpw(password.encode(), bcrypt.gensalt())