NoneType Error - Ideas?

Building a custom login page and I got just about everything working. The issue I am running into is when I check to see if the userid exist the sql statement returns a none type and I error out:

TypeError: ‘NoneType’ object is not subscriptable

Code looks like this:

if hashed_pw is None:
proceed = 1

Any ideas?

what happens if you print hashed_pw?

1 Like

I figured it out (thanks to your reply)! There was an error a few lines before the test (which the debugger told me but I didn’t pay attention too). Changed my if statement around and I was good to go!

2 Likes