techwithtim/Flask-Web-App-Tutorial

TypeError: object of type 'NoneType' has no len()

Opened this issue · 1 comments

hi i m new to this. maybe its a noob question but i have this error and i cant find the way to fix it

line 51, in sign_up
elif len(your_name) < 2:
^^^^^^^^^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()

why read it as None? what i must change to fix this?

hi again .i saw the video many times and i read all the issues and i check again all the code from start and finally i found this from : WJR1986 comment :

update this line:
new_user = User(email=email, first_name=first_name, password=generate_password_hash(password1, method='sha256'))

to this line:
new_user = User(email=email, first_name=first_name, password=generate_password_hash(password1, method='pbkdf2:sha256'))

now works perfect!