You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should log me in to the notes when clicking on "Login" button.
Current Behavior
When clicking "Login" I get an an Internal Server Error (500), and on the backend i get the following error:
if bcrypt.checkpw(form.password.data.encode('utf-8'), user.password.encode('utf-8')):
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'bytes' object has no attribute 'encode'. Did you mean: 'decode'?
Possible Solution
in blueprints/guest_bp.py:
change line #45 from:
if bcrypt.checkpw(form.password.data.encode('utf-8'), user.password.encode('utf-8'):
to:
if bcrypt.checkpw(form.password.data.encode('utf-8'), user.password):
The text was updated successfully, but these errors were encountered:
Expected Behavior
Should log me in to the notes when clicking on "Login" button.
Current Behavior
When clicking "Login" I get an an Internal Server Error (500), and on the backend i get the following error:
AttributeError: 'bytes' object has no attribute 'encode'. Did you mean: 'decode'?
Possible Solution
in blueprints/guest_bp.py:
change line #45 from:
if bcrypt.checkpw(form.password.data.encode('utf-8'), user.password.encode('utf-8'):
to:
if bcrypt.checkpw(form.password.data.encode('utf-8'), user.password):
The text was updated successfully, but these errors were encountered: