I am trying to show my twitter timeline on Tkinter window using tweepy. This is the code
import tweepy
import tkinter
consumer_key = 'xxxxxxxxxxxxxx'
consumer_sec ='xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
acc_token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
acc_token_sec = 'xxxxxxxxxxxxxxxxxxxxxx'
auth = tweepy.OAuthHandler(consumer_key,consumer_sec)
auth.set_access_token(acc_token,acc_token_sec)
api = tweepy.API(auth)
tweets = api.home_timeline()
tkwindow = tkinter.Tk()
for tweet in tweets:
i = 1
label = tkinter.Label(tkwindow, text=tweet.author.name + " " + str(tweet.created_at) + "\n" + str(tweet.text))
if i == 5:
break
tkwindow.mainloop()
But I am having following error
_tkinter.TclError: character U+1f449 is above the range (U+0000-U+FFFF) allowed by Tcl
I understand that tkinter can't show some special icons which appear in real tweets, But actually, I don't want to show those, I just want to show simple text of the tweet,
So How I can avoid this error and show only text of the tweets