Getting TypeError while calculating happy percentage

So i went through the twitter question which is the last one and i came across an TypeError while calculating the happy percentage does anyone have a solution?
my code and error are:

happy_fraction = (number_of_happy_tweets / number_of_tweets)
TypeError Traceback (most recent call last)
----> 1 happy_fraction = (number_of_happy_tweets / number_of_tweets)

TypeError: unsupported operand type(s) for /: ‘int’ and ‘NoneType’

Thank You

Your number_of_tweets variable is set to None.

Set it to a proper value, and the error will disappear.

Yeah I did that later
Thanks for the help