Thank you for your comment @IgorBrigadir . I believe there is something wrong with some of the attribute s here https://github.com/search-tweets-python/tree/v2
One key update is handling the changes in how the search endpoint returns its data. The v2 search endpoint returns matching Tweets in a data array, along with an includes array that provides supporting objects that result from specifying expansions. These expanded objects include Users, referenced Tweets, and attached media. In addition to the data and includes arrays, the search endpoint also provides a meta object that provides the max and min Tweet IDs included in the response, along with a next_token if there is another ‘page’ of data to request.
Currently, the v2 client returns the Tweets in the data array as individual (and atomic) JSON Tweet objects. This matches the behavior of the original search client. However, after yielding the individual Tweet objects, the client outputs arrays of User, Tweet, and media objects from the includes array, followed by the meta object.
Finally, the original version of search-tweets-python used a [Tweet Parser](https://twitterdev.github.io/tweet_parser/) to help manage the differences between two different JSON formats ("original" and "Activity Stream"). With v2, there is just one version of Tweet JSON, so this Tweet Parser is not used. In the original code, this Tweet parser was envoked with a tweetify=True directive. With this v2 version, this use of the Tweet Parser is turned off by instead using `tweetify=False
I guess some object causing this problem , I got an error when I used
df_f = pd.read_json(‘Final.json’, orient=‘split’)
result = df_f.head(20)
print(result)
raise ValueError(f"JSON data had unexpected key(s): {bad_keys}")
ValueError: JSON data had unexpected key(s): context_annotations, name, geo, description, withheld, entities, place_type, media_key, referenced_tweets, conversation_id, author_id, type, location, text, public_metrics, id, created_at, attachments, country, username, lang, verified, full_name
raise ValueError(f"JSON data had unexpected key(s): {bad_keys}")
ValueError: JSON data had unexpected key(s): referenced_tweets, context_annotati ons, created_at, country, description, verified, place_type, geo, public_metrics , conversation_id, username, location, withheld, name, full_name, type, id, enti ties, media_key, text, author_id, lang, attachments
Should I discard all the tweets that I collected as some of these attributes has no keys? what do you suggest?