I want to hydrate a covid-19 tweets id CSV file. I try to follow https://theneuralblog.com/hydrating-tweet-ids/ for the hydration. I'm using Jupyter notebook, running line by line. But there is an error when I code:
for tweet in t.hydrate(open('/Users/peggyleung95/Desktop/FYP/Untitled Folder/corona_tweets_theta.csv')):
print(tweet['text'])
print(tweet['id'])
if tweet['place']:
print(tweet['place']['country'])
An error msg showing:
KeyError Traceback (most recent call last) in 1 t = Twarc(consumer_key, consumer_secret, access_token, access_token_secret) 2 for tweet in t.hydrate(open('/Users/peggyleung95/Desktop/FYP/Untitled Folder/corona_tweets_theta.csv')): ----> 3 print(tweet['text']) 4 print(tweet['id']) 5
KeyError: 'text'