Flask-Web-App-Tutorial icon indicating copy to clipboard operation
Flask-Web-App-Tutorial copied to clipboard

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

Open gousfraba opened this issue 1 year ago • 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?

gousfraba avatar Feb 12 '24 21:02 gousfraba

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!

gousfraba avatar Feb 13 '24 20:02 gousfraba