error in the code

when i am trying to execute the code in binder i am getting in an error as shown in the figure. but when i tried to execute the code in anac

onda it does not show the error and i get the desired result. Can someone please explain this errors

Seems like you changed the value of tweets variable to some number.

My guess is you did something like tweets = len(tweets).

1 Like

Can you show the other cells corresponding to tweets cells? so that it could be easy to pin point the error.

1 Like

Check your tweets variable if it is int or list.

1 Like

I think you need to show the cells that are related to the tweets. In order to pinpoint the problem

And if can create another cell and put:

print("Number of happy tweets:", number_of_happy_tweets)

And try to see the output is what?