print 実行時に下記エラーがどうしても出てしまいます。
OSはmacOS High Sierra 10.13.3
python ver 3.6.0
atom ver 1.25.0
下記も参考にしていますが、変化ない状態です。
UnicodeEncodeErrorにどう対処すれば良いか?
http://hikm.hatenablog.com/entry/20130328/1364492471
エラー出ないよう対処法伺いたいです。
ーーーーーーーーーーーーーーーーーーーーーー
-- coding: utf-8 --
import tweepy
consumer_key = ''
consumer_secret = ''
access_key = ''
access_secret = ''
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_key, access_secret)
api = tweepy.API(auth)
tweets = api.search(q='任意の文字', count=10)
for tweet in tweets:
print(tweet,"/n")
ーーーーーーーーーーーーーーーーーーーーーーーー
エラー文
Traceback (most recent call last):
File "---略--get_tweets.py", line 19, in <module>
print(tweet,"/n")
UnicodeEncodeError: 'ascii' codec can't encode character '\u2726' in position 463: ordinal not in range(128)