Ask coding questions

← Back to all posts
TypeError: object of type ‘NoneType’ has no len()
Nikerage

As you can see in the header, my code in line 66 shows up an Error Object of Type "NoneType" has no len().

Im stumbled from one problem to this one, no i really have no clue what to do. The Bot should be able to answer to a "bad word" like "hue" with a random text (1-3) and you should be able to create new ones with "$new text*" and delete them with "$del"

Can someone help me out?

PS: Im working with the tutorial of freeCodeCamp. It's nice and working good, but to some point a bit outdated i think.

xxx

Voters
Nikerage
Comments
hotnewtop
MrVoo

I don't see len() anywhere near line 66, can you be more descriptive?

Nikerage

@MrVoo nvm, it somehow worked now but this is showing up. I don't get it

MrVoo

@Nikerage It means you never said what the value of encouraging was, or you defined it after it was referenced.