Python Error AttributeError: ‘NoneType’ object has no attribute ‘encode’

Solution

if request.method == 'POST':
    updated_password = generate_password_hash(
        request.form.get('updated-password'))